Vuforia Play Mode in Unity

Vuforia Play Mode is fully integrated in Unity and it is the quickest way to test your projects during development right at your PC or Mac. Use the Webcam or Simulator play Mode that is distributed with the Vuforia Engine SDK for Unity to fast-track your development process.

Unity’s Play Mode supports all target types from Vuforia, and it is controlled by using Unity’s Play, Pause, and Step buttons. We present two Play Modes which enables you to quickly test your build and targets.

Vuforia Play Modes

  • Webcam
  • Simulator

The two modes can be found in the Vuforia Configuration. From a dropdown menu you can select between them. To enable Vuforia Engine in Unity, please refer to this guide.

Vuforia Image

Webcam Play Mode

The Webcam Play Mode uses a webcam to simulate tracking of Vuforia targets at your desk. It requires you to use your in-built Webcam in your laptop or connect one via USB (External Camera) to your PC. The Vuforia Engine will automatically detect if a Webcam is available that can be chosen from the dropdown menu Camera Device if you have multiple connected.

Vuforia Image

Testing Targets Types with WEBCAM

Webcam play mode supports all Vuforia target types except Area Targets which is supported only in Simulator Mode. Once in play mode, the webcam will simulate detection and tracking of your target. Test your target and your content as you would if you had built the Unity Project to your device.

Note that device tracking is not as good on a webcam as it would be on your device given that your webcam does not come with any sensors.

Vuforia Ground Plane emulation

To test Vuforia Ground Plane with a Webcam, it is necessary to use an Image Target as the ground. A webcam cannot detect and track the ground on its own, so we will instead emulate the ground with an Image Target. If you are using the Vuforia Core Samples, the EmulatorGroundPlane.pdf can be found in  Packages\VuforiaEngineAR\Vuforia\Databases\ForPrint\Emulator or in Packages\com.ptc.vuforia.engine\Vuforia\Database\ForPrint\Emulator

Vuforia Image

For more information, please refer to Introduction to Ground Plane in Unity.

Simulator Play Mode

This Play Mode is purely simulating tracking and detection of your Vuforia targets. When enabled, the simulator mode will create a virtual space that you can move the ARCamera around in and the feature is especially intended for testing Area Targets. That being said, you can use other target types independently or simultaneously in the simulator mode if you, for instance, do not have your target nearby or it is too large to test with a webcam.  

Go to Vuforia Configuration and set the Play mode type to SIMULATOR. The simulator mode allows you to adjust the virtual walking speed as well as detection distance for simulated tracking and the key bindings for moving around. (See below Image).

Vuforia Image

Testing Target Types with SIMULATOR

To test one or more of your Vuforia Targets in your build simply add the Vuforia Engine GameObjects in your scene and set them up with the appropriate targets or databases. Upon pressing Play you will be able to navigate within the space starting at the origin of the ARCamera GameObject.

Vuforia Image

Target detection in simulation mode

Simulator mode is helpful for positioning and testing your content in relation to scanned areas and other target types. 
Starting with Vuforia Engine 9.1, targets will be reported as tracked as soon as they come into the virtual camera view and closer than the detection distance defined in the Vuforia Configuration.
If the Device Tracker is started, they will be reported as extended tracked as soon as they leave the camera view.
This allows rapid prototyping of your application’s scripts if they react to targets being detected or out of view, even if you do not have access to the physical targets.

NOTE: That this simulated detection does not actually use computer vision and therefore does not replace testing the actual detection and tracking quality of your real targets on mobile devices.

Learn More

Getting Started with Vuforia in Unity

Introduction to Model Targets in Unity

Working with VuMarks

Introduction to Ground Plane in Unity

Using Area Targets in Unity