/
Unity Testing with Mock HMD

Unity Testing with Mock HMD

In depth learning on Creating a Motive Powered Unity Project can be found in this course in Motive Academy.

If you are looking to test a Unity scene and you don’t have a headset nearby to test with, no worries. We can download a sample that is included in a Unity package already included as a dependency in Motive Unity projects.

  1. In your Unity project click Window > Package Manager > XR Interaction Toolkit > Samples

  2. Choose the Import button next to XR Device Simulator:

  1. Under Assets > Project Settings > XR Plug-in Management, toggle your Plug-in Providers to just Mock HMD Loader:

  1. Open the XR Interaction Toolkit tab and toggle Use XR Device Simulator in scenes to True and set the XR Device Simulator prefab to XR Device Simulator:

  1. Next, in your Project tab search for the newly downloaded XR Device Simulator prefab and drag and drop it into your Init scene in your project's Scene Hierarchy:

  1. Expand the XR Toolkit Player prefab in your scene Hierarchy

  2. Select the XR Origin game object

  3. Alter the height of this game object so it is at an appropriate head height:

 

Tip: Before you hit the play button and test your scene I recommend you set it up so the Game View will maximize on play.

 


Now when you hit play you should be met with a view similar to this:

If it shows the sight out of both “Eyes” make sure to hit the drop-down near the top middle of your screen and set it so the camera view shows just the Left or Right Eye.

You can now customize your controls how you like by altering XR Device Simulator Controls which can be found in your Project window.

But, by default, you can control your avatar with WASD to walk and Q/E to hover higher/lower. Then use Tab to rotate through both of your player's hands. While controlling a hand Left-click acts as your select/use button and G acts as your grab button.

Related Articles

Walkthroughs

Related content

App Configs
App Configs
Read with this
Video Walkthrough - Setup Lightweight SDK VR Sample with Launch Server and Launch Pad
Video Walkthrough - Setup Lightweight SDK VR Sample with Launch Server and Launch Pad
More like this
Building and Hosting Unity WebGL Applications on Launch
Building and Hosting Unity WebGL Applications on Launch
Read with this
Motive Prefabs
Motive Prefabs
More like this
WebGL Keyboard/Mouse Layout Testing
WebGL Keyboard/Mouse Layout Testing
Read with this
Motive Unity SDK Setup - Unity Workshop Demo Scene
Motive Unity SDK Setup - Unity Workshop Demo Scene
More like this