Basic requirements for a location

When you create a location, the Unity scene must include specific components. You can then add any additional features and components that you want. The basic requirements of a location are described in the sections below.

We recommend that you start with the example scene, and remove objects that you don't need. Alternatively, if you start with an empty scene, you can add preconfigured objects from the /Assets/ENGAGE_CreatorSDK/Prefabs/Tools folder.

Root object structure

The root of the scene is a game object positioned at the world origin and with a default scale of 1 for all dimensions. The root object is named EngageScene in this example. The child of the root object is also a game object positioned at the world origin and with a default scale of 1 for all dimensions. The child is named Scene_Root in this example.

The child object must have the LVR_Scene Root script attached.

Scene Variables

One object in your scene must have the Scene Variables script attached. You can leave the majority of parameter settings at their default values, but you must set the following parameters:

  • Scene Filename:

  • User Spawn Point: Reference to the game object that marks the spawn point. See Player start position.

Network state manager

One object in your scene must have the LVR_Location_Network_State_Manager script attached. You don't need to configure the script if you don't want to use networks states.

Player start position

Each location must include a game object that marks the position where users appear. You can use an empty game object, position it at the appropriate location, and then drag the object from the hierarchy to the User Spawn Point parameter in the Scene Variables script. For more information, see Scene Variables.

You can also add a start position circle as a child of the player start position. You can use this object to visually represent the region within which players will spawn. Ensure that the start position circle is tagged as EditorOnly, so that it does not appear in the ENGAGE app.

Location boundary

Your scene must have one location boundary. The location boundary defines the area within which you expect users to remain. The location boundary operates as a physical barrier that users can't easily move past. If an avatar moves outside of the boundary, they respawn at the start location.

Teleport targets

By default, all objects are invalid teleport targets. You must configure which surfaces you want users to be able to teleport onto. In the majority of locations, at a minimum, you will set the floor as a valid teleport target.

To define an object as a valid teleport target, you must set the following two properties:

  • Add a collider, such as a Box Collider.

  • From the Tag list, select TeleportGround.

Lighting

We recommend a maximum of one real time light in a scene. Use of more than one real time light can significantly reduce performance, particularly on mobile devices. You can include any number of additional lights in a scene if you bake the lighting.

Last updated