Instant Preview allows you to skip the build process and test your VR app instantly on your device, significantly improving iteration time. Instant Preview consists of an Android app for your Daydream-ready device and a plugin for your Unity or Unreal editor. It supports two modes: Full VR Preview mode and Controller-only mode.
Full VR Preview mode reflects your editor changes onto your Daydream device in VR. The Instant Preview mobile app streams head pose and controller data to your game engine, where the plugin will render the scene in stereo and stream video back to your device. This allows for an instant preview of your app with low enough latency to enable comfortable use over longer sessions.
Controller-only mode allows you to stream only controller data over to the editor. Use this when you are only iterating on your controller interactions in your game engine to save your phone the computational burden of running in full VR preview mode.
Other key features:
- Customizable streaming settings to optimize for resolution or for latency.
- Compatible with Unity 5.6 or Unreal 4.15.
To use Instant Preview, you need both the Android app and the corresponding plugin for your game engine. The Android App is included with the download for each of the game engines.
Instant Preview for Unity is offered as its own package on GitHub.
Instant preview for Unreal is available as part of the most recent Google VR Unreal branch. For instructions, see the Unreal downloads page.
Getting Started in Unity
Install the Instant Preview application to your device. From the command line in the folder containing the apk:
adb install -r InstantPreview.apk
Ensure your build platform is set to Android.
- Import the Instant Preview .unitypackage that corresponds to your GVR
version to your project (Assets -> Import Package -> Custom Package)
- Your project should already contain the gvr-unity-sdk.unitypackage. Check your gvr-unity-sdk README.md for your GVR Unity version.
- Add an instance of the
GvrInstantPreviewMainprefab from the InstantPreview/Assets folder to your scene hierarchy. It persists across scene transitions, so you can add it to your entry point scene root.
Configure Instant Preview as required:
- Output Resolution: Changes streaming resolution to Big (2560x1440), Regular (1920x1080), or WindowSized (scales with Game Window size).
- Multisample Count: Adds Multisample Anti-Aliasing to the scene. A value of 1 has no anti-aliasing, while higher values correspond to higher quality.
- Bit Rate: Encoding bitrate. Lower values encode at lower quality but runs at higher framerate.
Connect your phone via USB and launch Instant Preview.
Getting started in Unreal
- Create and set up a Google VR Unreal project.
Install the Instant Preview app from UnrealGithub/Engine/Source/ThirdParty/GoogleInstantPreview/InstantPreview.apk
adb install -r UnrealGithub/Engine/Source/ThirdParty/GoogleInstantPreview/InstantPreview.apk
Launch Instant Preview. Ensure that your phone is connected via USB.
- Launch the Unreal Editor and open your Google VR enabled project. The Instant Preview app should tell you that it is ready to stream.
Start your project in the editor in VR Preview mode.
To change the resolution, select advanced settings in the Play dropdown menu, and change the play-in-editor window resolution to the desired setting.
Using the Instant Preview app
When you launch the app, you will be able to select between Full VR preview and Controller only streaming modes. Pressing PLAY in your Unity or Unreal editor will begin the stream.
If you are having trouble connecting, please ensure your device is connected to your computer via USB and that you have followed the steps above for your particular engine.
If you cannot connect in Unity, please check the following:
- Your build platform is set to Android.
- You have imported both the gvr-unity-sdk and InstantPreview .unitypackage to your project.
- You have added the
GvrInstantPreviewMainprefab to your scene.
- Confirm that when you press Play in Unity, the Console displays both both “GVR Unity SDK Version: 1.xx” and “Instant Preview Version: 1.0.0.x” (where x is replaced by a version number).
If you cannot connect in Unreal, please check the following:
- You have set the ANDROID_HOME environmental variable to point at the
Android SDK Path (e.g. C:/Users/
- You have enabled the Google VR Plugin in your project.
- Check that the .dll and .dylib files under
/Release/ are the same as those in Engine/Source/ThirdParty/GoogleInstantPreview/<your_platform/Release/
If your issue is not addressed here, please report it at our Instant Preview issues page on GitHub.