Table of Contents

Creating a Scene

Creating a VIROO scene starts by creating a Unity scene. Currently, scenes are developed on the Built-in Render Pipeline.

Create a new Unity scene

Before you begin: To start creating your first scene, you must have previously configured your development environment. This includes making sure that you are using the correct version of Unity, that you have installed the VIROO Studio package and that you have the project set up correctly. See more information at Set up your Basic Environment.

So, as a first step, create a new scene in your project.

create-new-scene.png

Set up the scene properly

In the new scene you have just created, you must delete the camera. When you run a scene (in the Editor or Player), the VIROO framework takes care of creating the camera (and the complete XR Rig).

A VIROO Scene must have a Root GameObject in the scene. All elements of the scene should be inside its hierarchy. This GameObject must contain DependencyInjectionContext and DependencyInjectionContextAutowire components.

It is not necessary to create this object manually, it can be created automatically from the template provided by VIROO Studio:

  1. Right click on the Hierarchy panel to bring up the object creation menu.
  2. Click on Viroo -> Studio -> Template.

The template also adds a GameObject with the SinglePlayerStart component. This will be the point at which users will spawn when using this scene.

scene-template.png

root-game-object.png

Add your own content

Now you are ready to compose the scene with the 3D elements you want. You can use your own 3D models or get them from third-party stores (such as Unity Asset Store) to make the environment look according to your needs.

All the content you add must be added into the Root GameObject hierarchy.

To add interaction easily, the recommended way is to use the VIROO Interaction System. This will allow you to add interaction to the scene in a simple way, with the most common types of interaction in VR. You will also be able to make these interactions trigger logic in your scene, such as moving objects, playing animated sounds, playing videos, teleporting users, etc...

Go to the next section, Publishing a Scene, to see how you can publish your scene.