Instant Preview

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.

Getting Started

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.

Download Instant Preview for Unity

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

  1. Install the Instant Preview application to your device. From the command line in the folder containing the apk:

     adb install -r InstantPreview.apk
    
  2. Ensure your build platform is set to Android.

  3. 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.
  4. Add an instance of the GvrInstantPreviewMain prefab 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.
  5. 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.
  6. Connect your phone via USB and launch Instant Preview.

Getting started in Unreal

  1. Create and set up a Google VR Unreal project.
  2. Install the Instant Preview app from UnrealGithub/Engine/Source/ThirdParty/GoogleInstantPreview/InstantPreview.apk

    adb install -r UnrealGithub/Engine/Source/ThirdParty/GoogleInstantPreview/InstantPreview.apk
    
  3. Launch Instant Preview. Ensure that your phone is connected via USB.

  4. Launch the Unreal Editor and open your Google VR enabled project. The Instant Preview app should tell you that it is ready to stream.
  5. Start your project in the editor in VR Preview mode.

  6. 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.

Troubleshooting

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 GvrInstantPreviewMain prefab 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//AppDate/Local/Android/sdk)
  • You have enabled the Google VR Plugin in your project.
  • Check that the .dll and .dylib files under Engine/Binaries/ThirdParty/GoogleInstantPreview//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.