This guide will help you set up a scene by using existing assets. Refer to the existing finished scene "Prospect Point - Final" for guidance!
Keep in mind that certain assets can be switched out, such as meshes, or the content inside info panels.
Create a new scene and name it as desired. We'll name ours "First Time Setup".
It should begin with a Main Camera and a Directional Light. Delete the Main Camera. This is a static camera, but in our scene, WE will be the camera with our headset!
Locate these following prefabs and drag them onto the scene.
After doing so, fulfill the dependencies of the prefabs. GlobalManager requires access to [VRTK], so drag the [VRTK] gameobject onto the empty space.
Remember to always save the scene! Either go to File/Save Scenes, or press Ctrl+S or Cmd+S.
No we will add some of the optional interactive elements that are part of the project.
Locate these prefabs and drag them onto the scene.
The scene should now look like the picture on the right.
These prefabs ALSO have dependencies that must be fulfilled! Let's go link them.
The PhotoSphere with Pillar object needs a Photosphere Prefab. Go to Prefabs/PhotoSphere/ and pick a photosphere and drag it in. Any will do for now - we have picked PhotoSphere - Seawall by Lighthouse.
Notice the different scripts attached to the Photosphere prefab.
When creating your own, make a copy of any one, and change these few things n the PhotoSphereVideo script attached:
If you wish to change how the photosphere looks, scroll up to the Mesh Renderer and click on the Material as shown on the right.
This will automatically locate the Material being used in your project. You should therefore be in Assets/Materials&Textures/PhotoSphere/
From here, feel free to copy any material or create your own, then add the panoramic image that you want onto the box as shown below.
Important: if you create a new material, make sure to change the Shader option to Unlit/Texture as the others are. It defaults to Standard.
Now that our PhotoSphere dependency is set, we do the same for the InfoPanel With Cassette.
Image Textures is a list of images that will populate the info panel. By default, the list is empty, so you should add a few.
To do so, click the drop down on the Image Textures, and change the Size field to a number.
Cassette Clip is the Audio Clip that holds the narration that will play from the attached cassette.
On the left is an example of what it would look like complete. (But with actual textures/images populating the list)
For AudioClips, the common formats such as mp3, wav, ogg all work, so choose the format to fit your needs!
Finally, the RockBlueGrey object does not have any dependencies, so it should be good to go as it is.
It is an example of an Interactive Object. Where you can grab it, throw it and it obeys laws of physics.
IMPORTANT
In Unity, there are things called Tags and Layers. We assign certain objects certain tags or layers to differentiate interaction.
For example, the InfoPanel is in a layer called Ignore Raycast. When we teleport, our beam checks for destinations via Raycast (imagine an invisible laser beam). Since the info panel is in the Ignore Raycast layer, it will not be possible to teleport onto it! These are some ways that tags and layers can be and are being used in this project.
So if you ever create your own object, make sure to take those properties into account.
To finish up, we will create some place that we can stand upon. In the project, this would be known as the Navigational Mesh, or NavMesh for short. What you see when you walk is NOT the actual object you walk on. What you actually walk on is a simple mesh that only exists in places that should be accessible.
For example, since we don't want players walking on the bushes at Prospect Point, we have a navmesh that has a hole where the bush would visually be. And the navmesh is set to be invisible.
Another reason for having a separate NavMesh is because of inefficiencies with making a high poly mesh a collider, but that is outside the scope of this guide.
We will create a plane by going to GameObject tab on the very top menu, then dropping it down to 3D Object and selecting Plane. Or you may do the same by right clicking on the Hierarchy.
Once that is done, there should be a plane in your scene. Double click it to see it closer up on your Scene tab.
It's time to move all the objects onto the plane so we can walk about, interacting with all the objects on the scene.
Let's first center the plane by changing the position to 0, 0, 0 and let's also make it larger by changing the scale to 10, 1, 10.
If you lose sight of the plane on the Scene tab, just double click the object on the Hierarchy to automatically go to it.
Then move all the other interactive objects to a position so that they are above the plane. This will be tough for the [VRTK] object, since it is not visible until the scene is played. So just leave it as it is, and adjust it later.
Now comes a very important step. A navigational mesh requires a Collider.
The Plane object comes with a Mesh Collider which is perfect.
Now you should be ready to play the scene. Don't worry if there are errors! Our scene does not have all the prefabs like the main project scene does, and this leads to some scripts not being able to find things. However, you should be able to interact with everything we just added, in addition to teleporting around and ArmSwinging!
To find out how to interact with the objects just added to the scene, refer to their individual wiki page :)
Finally, here's what our scene looks like! Keep adding more prefabs and refer to the wiki for more info.
Happy developing!