Setup OVRTK with Unity Engine
Last updated
Last updated
This setup guide provides step-by-step instructions on configuring your editor environment to fully utilize the capabilities of OVRTK.
Install Unity Engine 2021 or a more recent version through Unity Hub, ensuring that you include Android Build Support, OpenJDK, and Android NDK & SDK Tools during the installation process.
Begin by initiating a new project and opt for the 3D Core template. Specify the project's name and location, and proceed to create the project.
After your project is open, navigate to Build Settings through File > Build Settings and switch the current platform to Android
Once you've switched the build platform, proceed to download the OVRTK Unity Package from the official repository.
Import the OVRTK Unity Package into Unity Engine
After importing OVRTK, remove the main camera from the scene. Next, add a cube and adjust its position to (0, 0, 3).
To include the OVRTK Camera Rig, go to 'OVRTK,' then 'Components,' and select 'Add OVRTK VR Camera Rig.
To test within the editor, enable the Simulator by setting Enable Simulator to true and then press the Play button."
To build an APK, navigate to File > Build Settings Click Add Open Scenes to include the current scene, and then click Build to initiate the APK build process.
Please note that after the build process is complete, install the generated APK on your device. If your device supports gyro, it will simulate the 3DoF experience. Otherwise, you'll receive a warning indicating that your device does not support gyro.