Search…
Create your Space
Once you have created your assets and have an idea of what you want your Space to be you can start putting it together in Unity!

Scene Hierarchy

There are some factors in unity to keep in mind tin order to make the process of testing your space as smooth as possible. By default, your scene should have the following hierarchy :
Template V2.0 Hierarchy
Use this as a guide if things aren't working as expected.

Player Spawn Point

The spawn point is the Default location for a Player to spawn when connecting to the Space. There is a Spawnpoint in the Template scene, but if you delete it the Spawnpoint prefab can be found in the _MonaAssets folder in the Project window.
It is best to keep the Spawnpoint in the same location in the hierarchy as the image above. If it is anywhere else there is a higher chance the spawn location will default to 0,0,0.
If the Avatar gizmo turns red then the spawn point is most likely overlapping another object. The Spawnpoint Avatar gizmo should be blue.
If gizmos are turned off using the Gizmos button at the top right of the scene window, you can use the Pivot and Local mode for your gizmo set with the Position tool selected (at the top left of the Unity window). The green arrow is up, and the blue arrow is forward on the default gizmo.
If there is no Spawnpoint in the scene, the Player will spawn at the 0,0,0 location in the Space.

Adding Portals

A Portal is a gateway to other Spaces. It allows Spaces to be linked together, so that visitors can explore spaces on the Mona network. Your space requires at least one Portal.
Portal Prefabs are included in the Space Template scene. If you happen to delete the Portals, you can find the PortalPrefab in the _MonaAssets Folder in the Project Window.
Each Portal must have a unique name in your Space and have the 'Portal' tag applied.
The naming convention for tags should be "PascalCase" (i.e. Portal1 or TestPortal)

Editing Portals

The Portal Prefab consists of several child game objects.
Portals hierarchy example
  • First is the Portals Gameobject/layer which has the PortalLayer tag. Do NOT delete or move this object.
  • Under that is each Portal gameobject. The name of this gameobject is up to you.
  • Under that is a GameObject that must have a unique name, and the Portal Tag. It also requires a collider so that the player avatar can 'see' the object in order to interact with it.
  • A SpawnPoint is added. When another space links to your space, they will get an option to choose which portal they spawn from. This is where they spawn. Name your Portals well so others have a good idea of where a player will appear in your space. The Spawnpoints for Portals avatar gizmo is green, or red if it is in a location that overlaps another collider (which is not recommended)
  • The Assets gameobject holds the assets that visually represent your Portal in the scene, such as a door or portal, or anything else for that matter. These can have colliders on them so Players can't run through them.
  • Make sure that the Portal tagged object has a unique name and a collider.
  • The "Portal" tag is already in the tag manager in the Template, do not add or edit tags inside the tag manager.
  • Assigning the Portals target Space is done after you have minted the space. So don't worry about assigning a destination to your Portal until later in the process.

Artifacts (optional)

The Artifacts scene houses object that will be editable (to some degree) in the future. Anything that you do not want fixed in your space after minting should be under this scene.
The artifacts scene has an Artifacts Gameobject/layer with the ArtifactLayer tag applied. Do NOT delete or move these two objects.
There are currently two types of artifacts available.

Default Artifact

The Default Artifact is an object in the scene that can optionally link to external websites. This could be linked to an NFT marketplace, an existing portfolio website, a product page on an online store, whatever you like. Of course you don't have to link it if you don't want to.
  • Under the Artifacts GameObject/Layer are ArtifactPrefab objects in the template as an example. The name of this gameobject is up to you.
  • Under that is a GameObject that must have a unique name (in this case UniqueArtifactName_1 or 2), with the Artifact Tag applied. It also requires a collider so that the player avatar can 'see' the object in order to interact with it.
  • A SpawnPoint is also included. This will be used in future functionality.
  • The Assets gameobject has assets that visually represent your Artifact in the scene. These can have colliders on them so Players can't run through them. In the example below there are two artifacts in the scene.
Default Artifact examples
  • Each Default Artifact must have a unique name in your Space and have the 'Artifact' tag applied.
  • The naming convention for tags should be "PascalCase" (i.e. Artifact1 or TestArtifact)
  • The 'Artifact' tag is already in the tag manager, do not add or edit tags inside the tag manager.

Canvas Artifact

If you want an object to display media in the space from an external location (such as an image) you can use a Canvas Prefab. The canvas can be set to autoscale the canvas down to the media that you assign it during the submission process. Alternatively, you can scale the image up to the size of the Canvas. Testing this cannot be done in the Playground.
The Canvas can also link to an external website if you wish.
Canvases currently support .jpg and .png. More media types will be added in the future.
  • Under the Artifacts GameObject / Layer is a CanvasPrefab gameobject in the template as an example. The name of this gameobject is up to you.
  • Under that is a GameObject that must have a unique name, and the CanvasTag. It also requires a collider so that the player avatar can 'see' the object in order to interact with it.
  • A SpawnPoint is added. This will be used in future functionality.
  • The Assets gameobject has assets that can act as a frame for your media. These can have colliders on them so Players can't run through them. These objects do not scale according to the media you assign to it.
  • Assigning the Canvas target website and image is done in the submission stage. So don't worry about assigning a destination to your Artifacts until later in the process.
Canvas Example
  • Each Canvas must have a unique name in your Space and have the 'Canvas' tag applied.
  • The naming convention for tags should be "PascalCase" (i.e. Canvas1 or TestCanvas)
  • The 'Canvas' tag is already in the tag manager, do not add or edit tags inside the tag manager.

Importing assets into Unity

There are a number of ways to import your objects into Unity.
  1. 1.
    Save your assets into the Project folder directly.
  2. 2.
    Right mouse click on the target folder in the Project window and select Import new Asset...
  3. 3.
    Drag and drop your assets from Explorer into the target folder in the Project Window.

Setting up your imported assets

There are a couple of things you could / should do when importing your objects into Unity to save time later. These are optional however.
  1. 1.
    If you plan on using lightmapping (which we highly recommend) and want Unity to do the Unwrapping of the objects second UV Map to do so (so you don't have to do it yourself in another application), click on the Model in the Project window. Select Model at the top of the Inspector window, and turn on Generate Lightmap UVs (towards the bottom). This is a pretty common step to forget, so it's good to get in the habit early.
  2. 2.
    If you have Materials already created, you can make sure your model uses them by default by clicking on the model in the Project Window. Select Materials at the top of the Inspector window, and drag/Drop your materials into the correct slots for your object. These can be changed in the scene, but these are the default materials for your object and saves a lot of time when you are trying to update a lot of the same object in the scene.
More information on creating your space in Unity (such as lightmaps, animation, reflection probes etc can be found in the documentation to the left under unity Development).

Colliders

Colliders are used to have the player avatar not fall through the floor or walk through walls and objects. There are several collider types you can use :
  • Box collider (used for most situations, light and quick on the processor)
  • Sphere collider
  • Capsule collider
  • Mesh Collider
As tempting as it is to use the Mesh Collider on all of your objects this is not recommended as this adds considerable load to the space. If you must use a mesh collider, make a very simplified version of your object and use that in the Mesh Collider component.

Lighting

Realtime lighting

As noted previously, real time lighting is quite processor intensive and is recommended to keep to 1-2 real time lights unless you understand how to optimise heavily. Realtime lights allow dynamic objects (such as the player avatar or animated objects) to have shadows update in real time.
A Directional Light is included in the Template scene, however to add a new light to the scene you can add a Directional Light, Point light, or Spotlight to the scene by :
  • Right click on the target location in the Hierarchy window, go down to Light, and select which light you would like
  • Use the GameObject menu and go down to Light, and select the light you would like. This method places the light at the bottom of the Hierarchy however.

Lightmapping / Lightbaking

The best way to get good lighting is by using Lightmapping, which 'bakes' the light information into the scene for a much smaller cost to processing. You can find more information about how to do Lightmapping using the Unity Lightmapper here, or if you want a higher quality lightmapping solution you can look at purchasing Bakery on the Unity Asset Store. For more information on how to use bakery, you can go here.
Realtime lights can be turned into Baked lights easily using the Mode pulldown on the light itself. So you add them the same way as real time lights.

Reflection Probes

Reflection Probes are used to fake reflections in a Space as realtime reflections. As Mona can use Physics based Rendering (or PBR) for materials, you can get amazing results with reflection probes that represent real world results of materials such as shiny metal, through to buffed glass.
For more information on how to create Reflection Probes, you can go here.

Lighting Probes

Lighting probes are a tool that allows dynamic objects to be lit more accurately from baked information such as lightmaps. So all your fantastic baked lighting can be applied, in a way, to dynamic objects like the player Avatar so that it blends in with the environment better.
For more information on how to create Light Probes, you can go here.

In Summary...

Now that you have :
  • Added a player Spawnpoint
  • Added at least one Portal
  • Added any artifacts including the Default artifact or Canvas artifact
  • Imported and arranged all your assets
  • Added Colliders
  • Set up the lighting, both real time and light mapped
  • Added reflection probes
  • Added Light probes
You are ready to test your space! Although you will probably be testing your space as you go along to see how it is all coming together. So lets look at that!
Last modified 15d ago