> For the complete documentation index, see [llms.txt](https://priyanshu-1.gitbook.io/ovrtk/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://priyanshu-1.gitbook.io/ovrtk/getting-started/setup-ovrtk-with-unity-engine.md).

# Setup OVRTK with Unity Engine

This setup guide provides step-by-step instructions on configuring your editor environment to fully utilize the capabilities of OVRTK.

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

   <figure><img src="https://141545039-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLuQswtaibCWkYqMYtdUB%2Fuploads%2FlZNf6UAndFaZasoBLPGZ%2Fimage.png?alt=media&amp;token=9f0e6c7c-5625-4701-b4fa-71760e7805c7" alt=""><figcaption><p>Unity Hub</p></figcaption></figure>

   <figure><img src="https://141545039-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLuQswtaibCWkYqMYtdUB%2Fuploads%2FNBMeSoV14CyrKOLcTPls%2FScreenshot%202023-10-29%20at%201.13.49%E2%80%AFPM.png?alt=media&amp;token=a40e7e5e-0a54-4acf-a247-b84c026065ee" alt=""><figcaption><p>Unity Hub</p></figcaption></figure>
2. 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.

   <figure><img src="https://141545039-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLuQswtaibCWkYqMYtdUB%2Fuploads%2FZ2fTPrjhl8PTWTiiYyJb%2Fimage.png?alt=media&amp;token=f572f9db-00c3-4918-bd6b-d7d65f702470" alt=""><figcaption><p>Unity Hub</p></figcaption></figure>
3. After your project is open, navigate to **Build Settings** through **File > Build Settings** and switch the current platform to **Android**

   <figure><img src="https://141545039-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLuQswtaibCWkYqMYtdUB%2Fuploads%2FNf4QjvcB3BUtBIxUUcT3%2Fimage.png?alt=media&amp;token=3f20e44e-3245-4a85-9ef0-209d3efce736" alt=""><figcaption><p>Build Settings</p></figcaption></figure>
4. Once you've switched the build platform, proceed to download the OVRTK Unity Package from the official [GitHub](https://github.com/Priyanshu-CODERX/OVRTK/releases/tag/beta) repository.

   <figure><img src="https://141545039-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLuQswtaibCWkYqMYtdUB%2Fuploads%2FW4pXeOsKg7QSyzAQ2iM2%2Fimage.png?alt=media&amp;token=b5ef4623-5275-46a0-a53d-da34e79fc61b" alt=""><figcaption><p>Github</p></figcaption></figure>
5. Import the OVRTK Unity Package into Unity Engine

   <figure><img src="https://141545039-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLuQswtaibCWkYqMYtdUB%2Fuploads%2FPo0gpwqKkREdE2LaRH31%2Fimage.png?alt=media&amp;token=5ac2a104-41d9-4b6a-8e09-b75786c21f4e" alt=""><figcaption></figcaption></figure>
6. After importing OVRTK, remove the main camera from the scene. Next, add a cube and adjust its position to (0, 0, 3).

   <figure><img src="https://141545039-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLuQswtaibCWkYqMYtdUB%2Fuploads%2FuadtLEw3U5dU0pWMv1Ea%2Fimage.png?alt=media&amp;token=ff693b54-05a5-48c1-bfa5-2c4443630752" alt=""><figcaption><p>Unity Editor</p></figcaption></figure>
7. To include the **OVRTK Camera Rig**, go to '**OVRTK**,' then '**Components**,' and select '**Add** **OVRTK** **VR** **Camera** **Rig**.

   <figure><img src="https://141545039-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLuQswtaibCWkYqMYtdUB%2Fuploads%2FJPVGF8p6rM1GtjRDGtmx%2Fimage.png?alt=media&amp;token=a7a83e7f-11e7-46d5-ad77-added280946c" alt=""><figcaption><p>Unity Editor</p></figcaption></figure>
8. To test within the editor, enable the Simulator by setting **Enable Simulator** to **true** and then press the **Play** button."

   <figure><img src="https://141545039-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLuQswtaibCWkYqMYtdUB%2Fuploads%2FqaTC2obymP8ZA7e92n8p%2Fimage.png?alt=media&amp;token=5dc8dbf7-8740-4eeb-8de2-07ac5b1ed013" alt=""><figcaption><p>Unity Editor</p></figcaption></figure>
9. 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.

   <figure><img src="https://141545039-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLuQswtaibCWkYqMYtdUB%2Fuploads%2FWrGde7oT4vXSdZk3jI5V%2Fimage.png?alt=media&amp;token=4b80bf99-6bfb-44d8-b9c1-ed6d900d5008" alt=""><figcaption><p>Build Settings</p></figcaption></figure>

   <figure><img src="https://141545039-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLuQswtaibCWkYqMYtdUB%2Fuploads%2Fv5N6DerJBNZ5OoMC70gl%2Fimage.png?alt=media&amp;token=2047b2e4-03d5-49ef-ac87-6c598a2b422c" alt=""><figcaption><p>Finder</p></figcaption></figure>

   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.
