# Building for PC in Unity

Once you have a project that you want to build, you can follow this tutorial. This guide assumes you've configured your project for **OpenXR.** It is applicable to most PC VR systems that support OpenXR, including the following systems:

- Varjo Aero
- Valve Index
- Meta headsets
- HTC Headsets
- Windows Mixed Reality

<span style="color: #e03e2d;">**You should use a different build process for other VR systems and/or projects that <span style="text-decoration: underline;">do not</span> use OpenXR.**</span>

**<span style="color: #000000;">Building a PC VR Project in Unity</span>**

<span style="color: #000000;">In Unity, go to File &gt; Build Settings.</span>

<span style="color: #000000;">Verify that the platform is set to Windows, Mac, Linux.</span>

<span style="color: #000000;">In the lower part of the dialogue window, click on "Player Settings..."</span>

<span style="color: #000000;">In the window that opens, look in the left menu. Under "XR Plug-In Management" verify **OpenXR** is checked.  
</span>

<span style="color: #000000;">Underneath **XR Plug-in Management** there will be some items such as **OpenXR**, **Project Validation**, etc. Select **OpenXR** on the right. You will see a small window with **Interaction Profiles**. You may have already added the **Oculus Touch Controller Profile**.  
</span>

<span style="color: #000000;">Choose whichever controller is applicable to your targeted system. (You can add more than one profile to support multiple hardware systems)</span>

- <span style="color: #000000;">*Index Controllers*: choose "Valve Index Controller Profile"</span>
- <span style="color: #000000;">*Rift S Controllers*: choose "Oculus Touch Controller Profile"</span>
- <span style="color: #000000;">*HTC Vive Controllers*: choose "HTC Vive Controller Profile"</span>
- <span style="color: #000000;">*HP Reverb G2 Controllers*: choose Microsoft Motion Controller Profile"</span>

<span style="color: #000000;">***Note:*** it is possible to use controllers from one manufacturer with a headset from another. For example, you might choose "Valve Index Controller Profile" if you are using the Valve Index controllers with any other compatible headset such as the Varjo Aero, HTC Vive, etc.</span>

<span style="color: #000000;">Go back to the Build Settings window, which should still be open (if not, open it again).</span>

<span style="color: #000000;">Verify that the scenes you want to build are shown in the "Scenes to Build" window. If no scenes appear, you can drag scene files from the Project window into this box.</span>

<span style="color: #000000;">In the "Build Settings" window, click the "Build" button in the lower right.</span>

<span style="color: #000000;">In the dialogue window that opens, navigate to a location where you want to build your scene. It is <span style="text-decoration: underline;">recommended</span> to make a "Builds" folder within your Unity project, but this isn't necessary.</span>

<span style="color: #000000;">Click "Select Folder" and the project will build to that pointed directory.  
</span>

<span style="color: #000000;">To run your build, in your OS navigate to the folder where you built the project and double click the .exe file named for your project. </span>

<span style="color: #000000;">You can build a project on a computer other than the one you plan to run it on. Just make sure you run your build on the appropriate hardware per your build settings.</span>

**<span style="color: #000000;">Considerations</span>**

<span style="color: #000000;">Under Project Settings/Player/Resolution and Presentation, consider different modes such as Fullscreen or Windowed. Also note at the very top the is a location where you can add a Default Icon as well as Company Name and Product Name</span>

**Optimizing Your Build For VR**

Though the process above will result in a working build, there are some extra settings you can use to optimize your project for VR applications. These setting are all available in the "Project Settings" window on the left side.

- *Player &gt; Other Settings &gt; Color Space:* Set this to "Linear" to better support the built-in color profiles of VR headsets
- *Quality &gt; Rendering &gt; Anti-Aliasing:* Set this to "4X" to optimize edge smoothing for VR performance
- *Quality:* At the top, choose "High" to set a collection of settings in a manner that optimizes performance for VR