Troubleshooting Unity
Troubles encountered (and how to fix!)
Misc
I can't open my Unity project because Unity Hub says it's already open
Do this: https://hackmd.io/@fdengr/BJajQRf2_
Debugging C++
Debugging C++ Code for VR (Guide here)
Controls/UI
Unity's UI is constantly changing, and they rename things frequently. Try to look for the most up-to-date tutorials you can.
How to zoom in and out without a scroll wheel/right click (Mac)?
Select the view tool, hold down the control key, click and drag on the scene
How to rotate scene?
Hold down the option key, click and drag.
Scripts
I'm following a tutorial line-by line but still getting compiler errors!
Check your imports. If you are intending to use built in features in Unity or C# (like Enumerable) but they are not showing up as valid, a few ones you may want to have are:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System.Linq;
How to read Unity's compiler errors? Unity will tell you the type and line number of the error in a file, as well as the index number (which you can pretty much ignore). The first number in the ordered pair it complains about is the line number, second the index.
XR Interaction Toolkit
Even after following tutorials, I can't grab objects with the XR Interaction Toolkit
On your controllers, you must have sphere collider component attached, and set to a low enough size (like 0.05). Unsure if this applies if the controllers are ray-based.
Make sure the object you're picking up also has a collider on it, as well as a rigidbody component
You must have an Interaction Manger gameobject with an Input Action Manager component attched somewhere in your scene. This can be an empty gameobject. It just needs to exist. Under "Action Assets" field of the component, you must add the XRI Default Input Actions.
You must use XR Direct Interactor Component on your controllers, NOT Grab Interactor, as many tutorials will instruct you.
In Unity, built in 3D objects come with a collidable component and a rigidbody componant. If you are working with a parent object to child objects (i.e. a composite shape) , you MUST remove these from all children, and add a rigidbody and collidable componant to the empty parent class gameobject
My controllers/hands aren't tracking, even though they have the XR left and right controller components attached
Add Tracked Pose Driver component on each, not just to your main camera. Verify "pose source" field is left or right controller, respectively
Rendering
Scene view looks different than game view :(
Many different reasons for this:
Project Settings > Quality > Make sure quality for device is set to "Very High" or "Ultra"
Enable anti-aliasing: Project Settings > Quality > set Anti-Aliasing to 4x Multi-Sampling or higher
Make sure game view zoom is set to 1
If one model specifically looks weird, reimport model in a different format or get a different model