Unity Editor Live Preview

The Live Preview feature allows you to test all the Wikitude SDK functionality directly in the Unity Editor, without having to constantly build on a device. To enable it, select the WikitudeCamera game object and in the inspector make sure that Enable Live Preview is turned on. When enabled, the WikitudeCamera script will choose one of the following modes as an input source.

Static Image

This mode allows you to track a static image in the Unity editor, which is mostly useful to quickly test the same image repeatedly. The Static Image field will appear when this mode is selected and you can use any image from your project, as long as it has Read/Write Enabled turned on in the Texture Importer settings.

The Camera To Horizon Angle defines the angle between the forward vector of the camera and the horizontal plane. A value of 0 indicates that the camera is pointed directly forward, while a value of 90 means that the camera is pointed directly down to the ground. This angle is used to define the orientation of the ground plane relative to the image, when using instant tracking.

Web Cam

In this mode, the WikitudeCamera will try to find all the available cameras connected to your computer and use one of them as input for tracking. The WebCams dropdown allows you to select which camera should be used. If set to Default, the first camera found will be used.

The Camera To Horizon Angle works the same way as it does for the Static Image mode.

Remote Camera

This mode allows you to use the camera on your device, if it is connected to your computer and has the Unity Remote app installed and running. Please check the Unity Documentation for more information on how to get the remote app to work. This mode is very useful in case your computer doesn't have any cameras attached.

Additionally, Instant Tracking will only work properly in this mode, because we can use all the sensors from the connected device, which are not available in other modes. Image tracking in the Editor using the Unity Remote App