All rights reserved. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-08-06 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-08-06 UTC."],[[["\u003cp\u003eThis guide provides step-by-step instructions for migrating Unity projects from the deprecated Google VR (GVR) to the Cardboard XR Plugin.\u003c/p\u003e\n"],["\u003cp\u003eThe migration process involves exporting your existing GVR project, creating a new Unity project with the Cardboard XR Plugin, and adapting the scene settings for Cardboard compatibility.\u003c/p\u003e\n"],["\u003cp\u003eThe guide uses the "HelloVR" demo game as an example to illustrate the migration steps.\u003c/p\u003e\n"],["\u003cp\u003eYou'll need Unity 2021.3.32f1 or later with Android and iOS Build Support to complete the migration.\u003c/p\u003e\n"],["\u003cp\u003eFor detailed configuration instructions and device-specific settings, refer to the Cardboard XR Plugin Quickstart guide linked within the document.\u003c/p\u003e\n"]]],[],null,["# Guide to migrate a GVR project to Cardboard.\n\nThis guide shows you how to migrate Unity projects from the\ndeprecated Google VR (GVR) to use the Cardboard XR Plugin.\n| **Note:** To demonstrate the migration, you'll use **HelloVR** , a demo game provided by the [Google VR SDK for Unity](https://github.com/googlevr/gvr-unity-sdk/releases), to directly visualize the changes and adaptations needed. Configurations for other application scenes may vary based on their specific requirements and functionalities.\n\nSet up your development environment\n-----------------------------------\n\nSoftware Requirements:\n\n- [Unity 2021.3.32f1](https://unity3d.com/get-unity/download/archive) or later supported by the Cardboard XR Plugin.\n - Make sure to include Android and iOS Build Support during installation.\n\nOpen your GVR project and export the scene without the GVR package.\n-------------------------------------------------------------------\n\nFollow these steps to open your existing GVR project and export the scene.\n\n1. Open your Unity project using GVR.\n\n2. In Unity, go to **Assets** \\\u003e **Export package** to export the current project.\n\n3. Unselect all folders containing scripts to avoid compiling errors when\n importing the project on a newer version of Unity, as it does not support GVR.\n\nCreate a new project on a newer version of Unity and import your project.\n-------------------------------------------------------------------------\n\n1. Open a newer version of Unity supported by Cardboard XR Plugin (Unity 2021.3.32f1 or later) and create a new **3D** project.\n2. Import the GVR project.\n\nImport the Cardboard SDK.\n-------------------------\n\n1. Import the Cardboard SDK following the [Quickstart for Google Cardboard for Unity](https://developers.google.com/cardboard/develop/unity/quickstart#import_the_sdk_and_create_a_new_project).\n\nAdjust the scene settings to be supported by Cardboard.\n-------------------------------------------------------\n\n| **Note:** The following steps are necessary specifically for the **HelloVR** sample to function as intended. This section might differ when configuring other applications.\n\n1. Add the **ObjectController** script to all interactive objects in the scene.\n\n 1. On the Hierarchy panel navigate to Treasure and select the Icosahedron shape\n\n 2. On the Inspector panel on the left, in the Script component, select the ObjectController script.\n\n 3. Repeat the process on all three shapes.\n\n2. Drag the script **CardboardReticlePointer.cs** to **Player** \\\u003e **Main Camera** \\\u003e **GVRReticlePointer**.\n\n The script is located at\n `Packages/com.google.xr.cardboard/Runtime/CardboardReticlePointer.cs`.\n\n3. Drag the script **CardboardStartup.cs** to the **CubeRoom**.\n\n The script is located at\n `Assets/Samples/Google Cardboard XR Plugin for Unity/\u003cversion\u003e/\n Hello Cardboard/Scripts/CardboardStartup.cs`.\n\n4. Select **Player** \\\u003e **Main Camera** and, in the Inspector panel, add the component **Tracked Pose Driver**.\n\nConfigure and build your project.\n---------------------------------\n\n1. Follow the configuration guide provided in the [Quickstart for Google Cardboard for Unity](https://developers.google.com/cardboard/develop/unity/quickstart#configuring_android_project_settings) for your respective device."]]