Reality Roost Dev Guide
This guide will help you get setup for Unity development in Reality Roost
Installing Unity
- Make a Unity account here if you don't have one already. Either your student or personal email works fine.
- Sign up for the Unity Student Plan here.
- Make sure you press the "Free Access: Post-Secondary" button, not the "Free Access: Secondary" one

- Make sure you press the "Free Access: Post-Secondary" button, not the "Free Access: Secondary" one
- Download Unity Hub from here. Unity Hub is Unity's management tool and launcher for Unity development.
- Open Unity Hub and sign in to your Unity account.
- Navigate to the Installs tab and click Install Editor. Install Unity 6.0.60f1.



Select the following modules:

If you already have Unity 6.0.60f1 installed, but didn't install the above modules prior, you can add them to the existing installation.


- Wait for Unity Editor to install. This can take up to 20 minutes.
- Congratulations! Unity Hub, Unity Editor, and Visual Studio is now installed!
Unity Essentials
Unity Essentials is a course made by Unity designed to learn the basics of Unity. It takes a few hours to complete. If you haven't worked with Unity before, complete the course before working on Reality Roost.
I recommend you complete it in the Unity Editor (it will say this during the course), so you won't have to constantly switch between Unity and your browser. Text in the GroupMe if you need help completing it!
Pico Setup
Although we're developing Reality Roost to be usable for any headset with OpenXR, we're developing with Pico 4E headsets for now. We need to install the Pico Developer Center (PDC) and Pico OpenXR SDK.
- Create a Pico account here. Either personal or school email works.
If the sign in page doesn't work, use a different browser. Apparently Microsoft Edge can have issues
- Download the PDC here. Also download the emulator later down in the same page. Install both of them.


Pico Dev Center
Once installed and signed into Pico Dev Center (PDC), plug in the Pico 4E if you have it. It should pop up in Device Manager like so

Do the following on the headset
- Settings → General → Update software (could take up to an hour)
- Settings → General → About → Software Version → Click 7 times to unlock developer mode
- Make sure USB debugging is enabled in dev tools menu
Downloading RR Github repo
Prereqs
- Git: here
- Git Large File Storage: here
- Github Desktop: here (easier to use than Git CLI, but if you're accustomed to CLI that works too).
- Get added to the Github repo: ask in GroupMe
Setting up repo locally
- Open
Git Bash, and navigate to the folder you want the project to be stored. - Clone the repo:
git clone https://github.com/Izzy129/reality-roost.git - Open cloned repo:
cd reality-roost - Install Git LFS into the repo:
git lfs install - Pull Git LFS files:
git lfs pull - Open Unity Hub > Projects > Add > Add from Disk > Select wherever you cloned the repo

- Wait for Unity to setup the project, then open it.
- Ensure that you're using the Windows build profile, not the Android build profile. Reality Roost is a PCVR application that uses SteamVR, as required by NVIDIA CloudXR.
- To check, go to File>Build Profiles, and check if Windows is active like below. If not, click the Windows build profile and click the Switch Platform button

- To check, go to File>Build Profiles, and check if Windows is active like below. If not, click the Windows build profile and click the Switch Platform button
- Congratulations! You've successfully setup the Reality Roost project in Unity :D
ALWAYS run git pull or pull from the GitHub GUI before opening the project in Unity again after the first-time setup!
This ensures you have the most up to date code.
Setting up UnityYAMLMerge
Merge conflicts in Unity are a hassle to deal with. Thankfully, Unity provides a tool called UnityYAMLMerge that helps resolve these conflicts. You must set it up manually, since the location of the tool varies based on your machine.
- Open Unity Hub, and go to the Installs tab. On the Unity 6000.0.60f1 install, press Manage>Show in Explorer.

- In the folder that pops up, go to the Data>Tools folder.
- Find the UnityYAMLMerge.exe file. Single press it, and press
CTRL+Shift+Cto copy the path to the executable. - With the path in your clipboard, go to the Reality Roost folder, and open the
.gitfolder..gitfolder not showingIf you don't see the
.gitfolder, then you haveShow Hidden Foldersdisabled in File Explorer. Enable it like so:

- In the
.gitfolder, edit theconfigfile (use notepad++ or notepad) and add the following lines. Replace<EDITED_PATH>with the path we copied earlier, edited like so:- Replace the double quotes in the pasted text with single quotes.
- Replace the backslashes (\) with forward slashes (/).
- Edited path Example:
"C:\Program Files\Unity\Hub\Editor\6000.0.60f1-x86_64\Editor\Data\Tools\UnityYAMLMerge.exe"
becomes
'C:/Program Files/Unity/Hub/Editor/6000.0.60f1-x86_64/Editor/Data/Tools/UnityYAMLMerge.exe'
Lines to paste into git config:
[merge]
tool = unityyamlmerge
[mergetool "unityyamlmerge"]
trustExitCode = false
cmd = <EDITED_PATH> merge -p "$BASE" "$REMOTE" "$LOCAL" "$MERGED"
- Your final git config file should look something like this:
[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
symlinks = false
ignorecase = true
[lfs]
repositoryformatversion = 0
[merge]
tool = unityyamlmerge
[mergetool "unityyamlmerge"]
trustExitCode = false
cmd = 'C:/Program Files/Unity/Hub/Editor/6000.0.60f1-x86_64/Editor/Data/Tools/UnityYAMLMerge.exe' merge -p "$BASE" "$REMOTE" "$LOCAL" "$MERGED"
[remote "origin"]
url = https://github.com/Izzy129/reality-roost.git
fetch = +refs/heads/*:refs/remotes/origin/*
[lfs "https://github.com/Izzy129/reality-roost.git/info/lfs"]
access = basic
[branch "main"]
remote = origin
merge = refs/heads/main
Github Desktop Setup
This step is optional, but recommended since using Github Desktop is easier for Unity development.
- Open GitHub Desktop (you should've installed this earlier) and login.
- Click the Add an existing repository from your local drive button, and find the folder you downloaded Reality Roost to.

- Quick rundown of the UI. Fetch origin before pushing your change to ensure it doesn't cause merge conflicts after you push.

Pico Unity OpenXR SDK
To develop for Pico headsets, we need the Pico Unity OpenXR SDK in Unity.
Apparently, the Pico Unity OpenXR SDK does NOT support MacOS (see site).
I (Israel) haven't confirmed this, so if you have a Mac and it works fine, let me know!!!!
I've installed this package in the Github repo's Unity project, so you may not need to install it yourself.
To check if it's already installed, check in package manager:

If it's not installed, follow the below steps to install it manually.
- Open PDC and click Download Center → SDK Tab → Download the Pico Unity OpenXR SDK (NOT Pico Unity Integration SDK!!!)

If you accidentally installed Pico Unity Integration SDK instead of Pico Unity OpenXR SDK, uninstall it in PDC:

Then install the Pico Unity OpenXR SDK if you haven't already
- Open the Reality Roost folder in file explorer

- Press Start on the Pico Unity OpenXR SDK in the installed tab in PDC. This will reveal where the SDK is downloaded in a new file explorer window

- Make a new folder in the opened explorer window called
com.unity.xr.openxr.picoxr - Extract the contents of the
.zipfile to thecom.unity.xr.openxr.picoxrfolder. - Move the
com.unity.xr.openxr.picoxrfolder inside thePackagesfolder inside the Reality Roost folder

- Check that the package is properly installed in Unity Package Manager
Development Workflow
You have successfully setup Reality Roost for local development!
For quick reference, below is a workflow for development
Workflow
- Pull the latest changes with
git pull(CLI) orFetch origin(GUI) BEFORE OPENING UNITY - Do some work in Unity
- Add your changes to working tree
- Use
git add fileto addfileto your commit, orgit add .to add all changes. Or use GUI
- Use
- Confirm your changes are correct with
git statusin CLI (or use GUI) - Commit your changes with
git commit -m "Commit Description"or with GUI - Push your changes to GitHub in GUI or in CLI:
git push
Making a new branch
Git Branches allow you to diverge from the main branch to work on something without affecting everyone (e.g. a new feature, testing new things that could break overall system).
I recommend using them for larger features.
- Make a new branch in GUI or with CLI:
git checkout -b my-branch - Do work and periodically commit changes with workflow above
- When ready to merge your changes to the main branch, switch back to main branch in GUI or with CLI:
git checkout main - Merge your changes to the main branch in GUI or in CLI:
git merge my-branch - Push merged changes in GUI or in CLI:
git push
Handling Merge Conflicts
A merge conflict occurs when 2 developers change the same file, and Git gets confused on which version to accept (esp if you modified the same lines of code). Git does its best to resolve these automatically, but you may need to resolve it manually.
- Try using Unity's merge tool first:
git mergetool - If that doesn't work, see which files conflict with
git status - Manually resolve the conflicts in GitHub GUI
More Git Stuff
- We are using Git LFS (Large File Storage), an extension for Git that handles large binary files (e.g. player models, textures) efficiently.
TODO MORE LFS STUFF → this is more of a 2nd semester thing for the creative team - Packages installed from the Unity Package Manager are added to the
Packages/manifest.jsonfile. Then, when a developer pulls from Github, only themanifest.jsonis downloaded. Unity automatically installs packages listed inmanifest.json. - However, if you install a custom package (e.g. in
Assetsfolder; likely by doingAssets → Import Package → Custom Packageor downloaded from theAsset Store), you will need to commit them manually. TODO add instructions for committing Large packages w/LFS - We should split the project into smaller scenes to prevent merge conflicts, as well as announce to other devs when we're working on a specific scene. Also use Git branches. TODO GIT BRANCH GUIDE