Scene setup
Setting up the initial scene is fairly straightforward.
There are a limited number of assets that need to be present in the scene to be able to make it usable and publishable.
The folder that contains these components is:
Packages > Virtuademy-SDK-Environments > ScriptingApi > Placeholders > Fundamentals (the scripts), and Packages > Virtuademy-SDK-Environments > Prefabs > Fundamentals (the prefabs).
Placeholders
The components that are needed to setup the scene are:
-
FloorPlaceholder(Floor Placeholder script)It's mandatory that an item identifiable as Floor on the scene has the "Floor Placeholder" script.
The script allows VR users to be able to teleport around since the teleport activates only over items having the "Floor Placeholder" script component.

-
SpawnPoint(Spawn Point script)This prefab doesn’t have an essential function, because the absence of spawn points in the scene will cause players to appear at coordinates (0, 0, 0).
The Spawn Point allows the creator to freely choose the position and orientation of avatars, when they enter the scene, if the "SpawnPoint" script is attached to it. A ready-made SpawnPoint prefab is in Prefabs > Fundamentals > SpawnPoint.
The Spawn Point is visible in the worldThe prefab draws a marker (a footprint on a circle) at the spawn position, and users see it even when you hide their avatar. Turn off the renderers of the prefab's children, or keep the Spawn Point where no viewpoint of the camera looks.
Fixed camera: the character is still in the sceneWith a fixed camera the user's character is still there, and the desktop tablet opens at its head. When the scene starts, hide it with Virtuademy Character: Enable Mesh and stop it with Virtuademy Character: Enable Movement, both with
Enableoff (from a script:Player.ShowOwnAvatar(false)andPlayer.EnableMovement(false)).Closing the tablet undoes Enable Movement: the input comes back as the scene's input settings declare it, and the view goes to the character's camera, not yours. Scripts get no event when the tablet opens or closes. So leave the Movement, Jump and Sit options of Input Settings Mono off, as a new component has them, and face the Spawn Point towards a view that makes a good background for the tablet and for the moment it closes.
Enable Movement takes the input away, not gravity: put the Spawn Point on a surface with a collider (an invisible Box Collider is enough). Without the collider the character falls for the whole session, and the tablet shows broken.
Fixed cameras work on WebGL and mobile, not in VRIn VR the camera is the headset: the camera nodes (pan, move and the others of Character & Camera nodes) have no effect there. An environment designed around fixed cameras needs its own way to move in VR, for example teleport points: the Teleport node works in VR. Note that Enable Movement also turns off the controllers' teleport in VR.
VR: keep your world-space UI under the controller rayIn VR the controller ray is drawn on the Default sorting layer with sorting order 5. A sprite, a TextMeshPro 3D text or a world-space canvas of your scene on the same layer with a sorting order of 5 or more is drawn after the ray, and covers it where the ray passes over it. Give your world-space renderers sorting orders below 5: subtracting the same amount from all of them keeps their order among themselves. The app's own panels (tablet, pop-ups, quiz) can still cover the ray; a scene cannot change them.
Input settings and the start camera
The component Input Settings Mono (in Virtuademy.Environments.ScriptingApi.Placeholders) declares the input a scene starts with. Add it to a GameObject of the scene and set its Settings. The app reads the first active one it finds when the world loads, and applies it as the defaults of the character controller; a scene without one starts with the app's own defaults.
| Group | Option | What it does |
|---|---|---|
| Movement | Enable WASD Interaction, Enable Arrow Interaction | Move with the W A S D keys, or with the arrow keys |
| Movement | Enable Joystick Interaction | Move with the on-screen joystick (the keys keep working) |
| Movement | Enable Navmesh Movement | Move by clicking a point of the floor: the character walks there on the NavMesh |
| Camera | Enable Mouse Dragging Interaction, Enable Input Camera Interaction | Rotate the camera by dragging |
| Camera | Third Person (on by default) | The start camera mode: third person when ticked, first person when cleared |
| Camera | Constrained Rotation | Constrains the camera rotation |
| Zoom | Enable Mouse Wheel Zoom, Enable Pinch Zoom | Zoom with the wheel, or with a pinch on a touch screen. Zoom applies in third person only |
| Jump | Enable Jump With Key, Enable Jump With Button | Jump with the keyboard, or with the on-screen button |
| Sit | Enable Sitting Interaction | Sit on a seat with a click when in range, and get up by moving or jumping |
| Walk | Enable Walk Interaction | Walk instead of run while the Left Shift key is held |
Every option except Third Person is off in a new component. These are also the settings the camera and the movement come back to when a script or a graph calls ApplyDefaultInputSettings() (the Set Default Settings node), and when a pan ends: see Character & Camera nodes.
Make sure that within the scenes there are no GameObjects with the Camera component and the "MainCamera" tag.
This is important since custom cameras can interfere with the camera used by the platform.
Screen areas the application uses
On WebGL the application draws its own interface over the scene. Keep what matters to the user, and the objects that must be clicked, out of these areas. The values are approximate, as a share of the screen.
| Area | What is there |
|---|---|
| The top, about 9% of the height | The top bar |
| The bottom, about the lowest 20% of the height | The bottom band. It takes the clicks across its whole width, so an Interactable there receives none |
| The left | The task panel, when the environment uses the Task System |
| The top right | The user menu |
Put the on-screen UI of your own below the top bar, clear of these areas.
Keep what matters in a square
The WebGL camera has a vertical field of view of 60°. The window can be as wide or as narrow as the user makes it, and below 16:9 the view loses its sides. Keep what matters, a target or an object that must be seen, inside a 1:1 frame in the middle of the view, and look at the scene in a 16:9 window and in a nearly square one.
A Screen Space - Overlay canvas of your environment stays drawn over the desktop tablet while it is open: the platform's interface does not sort above it. A script cannot hide the canvas when the tablet opens, because scripts get no event when it opens or closes (see the fixed camera note above). Keep the overlay small and at an edge, and put nothing on it that the user must read or press while the tablet may be open.