The Immerse Platform supports multiple VR and browser users together in the same environment. From a debugging perspective, this can add an extra level of complexity, as scenes must be rigorously tested to ensure synchronisation occurs for all users. Compared to 'conventional' approaches, multi-user testing with real users requires a lot of time and coordination of real testers to perform efficiently.
To help simplify this process, the Immerse SDK provides a feature for emulating other users online, by playing back a recording of a user's actions. The avatar recording feature allows a developer to record a VR avatar's movements (with controller inputs) and save this to a file. Currently this feature is used in Playmode tests; offline tests for a scene running in the Unity Editor.
For each "emulated" user, a scene must be launched locally in a special mode; this scene will have no access to the VR hardware. Scenes are launched as separate processes on a developer's PC. Each of these will represent a unique user in the session.
A specific user's behaviour can be "scripted" by using the avatar recording feature. It allows a recording to be played on a specific user's instance from within the Unity Editor.
- Create or open an Immerse Scene (try using Assets > ImmerseSDK > Examples > Scenes > ExampleButton.unity)
- Make an avatar recording
- Open the Immerse Project Window by selecting Immerse > Window > Immerse Project
- Ensure Hold Point to Record[✓] is checked.
- Also check Offline in Editor[✓]
- Enter Playmode by pressing the [Play] button the the Unity Editor
- Put on VR headset
- Position yourself where you want to start the recording.
- Press and hold the 'Point' button on the VR controller. It will vibrate when recording starts.
- Perform the required actions
- When complete, press and hold the 'Point' button until the controller vibrates. The recording will be saved to disk, with the console log line output detailing the recording's location. An Explorer window containing the recording should also open.
- Rename or move the recording if required, but ensure it is in a Resources folder, as this is how it will be loaded at runtime.
- Take off headset and exit Play mode.
- Publish a PC Build after the recording file has been made (and renamed), so it will be included in the build.
- Ensure the scene is added to the Build Settings page.
- Open the Immerse Build Window by selecting Immerse > Build > Open Immerse Build Window.
- Select only Build VR (to build for PC / VR only)
- Click the [Build] button
- Once the build is complete, close the Build Window
- In the Immerse Project Window, ensure Offline in Editor is unchecked, as an online session is required.
- Log in using a valid session link available in the Spaces page (only a valid link is required)
- Open the Avatar Recording Window by selecting Immerse > Window > Open Avatar Recording.
- Drag the recording file into the File slot.
- Enter Playmode by pressing the [Play] button in the Unity Editor
- The Avatar Recording Window should now be showing a new button titled Launch a new test user in this session. If pressed, a new window will be launched running the Build made via the steps above (but without access to VR hardware). The name of this new user can be changed by editing the text in the Test User Name field before pressing it.
- Once the user's instance is running and has completed the startup sequence, a button should appear representing that user in the Avatar Recording Window. If pressed, the Avatar recording will start to play in the running Build.
- Put on VR headset in the Editor and perform testing and debugging. The other test user should act like a 'real' user
The Avatar Recording Window, in Playmode
When the Build starts up, a dialog will be displayed stating that VR hardware cannot be found. This is as expected, as conflicts with the Unity Editor must be avoided. Once the recording has started playing, this dialog will disappear.
- Close any running instances.
- Exit playmode in the Unity Editor.
- Make changes to the scene and/or code.
- Publish a new build.
- Enter Playmode, and launch a new Test user.
- Play the recording on that test user's instance.
- Put on a VR headset and perform the actions needed for debugging.
- Remove the headset
- Repeat steps
Updated 6 months ago