Similar project: https://vasturiano.github.io/react-force-graph/example/highlight/
Note: Windows computer required.
- Computer: Create Oculus Developer Account
- Phone: Get Oculus app on phone and login with developer account
- Oculus: (Optional) Turn device off then hold the power and volume down button on the headset for factory reset
- Oculus: Complete setup
- Phone: Pair Oculus with phone
- Phone: Enable Developer Mode under headset settings
- Oculus: Enable Hand Tracking in settings
- Computer: Install Oculus app and login with developer account
- Computer: Enable Unknown Sources in Oculus app settings
- Computer: Pair headset using usb c cable
- Oculus: Allow computer to access files, select always allow usb debugging, and enable quest link
- Computer: Download Visual Studio 2022 Community and install the Unity package
- Computer: Install Unity Hub and sign in with Unity account
- Computer: Install Editor with Android Build Support, but do not install Visual Studio again
- Computer: Create 3D Core project in Unity
- Computer: Import Oculus Integration asset to Unity project
- Computer: Open project settings and install XR Plugin Management
- Computer: Under XR Plug-in Management check Oculus under the Windows and Android tabs
- Computer: Under the Oculus tab, under the Android tab, check all target devices
- Computer: Add OculusInteractionSampleRig to the scene and remove the main camera
- Oculus: Connect Oculus to computer and open Quest Link
- Computer: Click play in Unity and the app should work on the headset
- Computer: Open Build Settings in Unity and select Android
- Computer: Select Oculus Quest as the run device and click build and run (Ctrl+B)
- Oculus: Run the app from the Unknown Sources section of the apps menu
Note: All steps on computer for this section.
- Set Hand Tracking Support to Hands Only under OculusIntegrationSampleRig -> OVRCameraRig -> General
- Set Hand Tracking Frequency to MAX
- Add the HandGrabInteractor prefab under OculusIntegrationSampleRig -> InputOVR -> Hands -> LeftHand -> HandInteractorsLeft, repeat for the right hand
- Import scripts into assets (script name must match class name)
- Create Empty called ScriptRunner in the scene and add the Main script to it
- Public variables will be accessible under the ScriptRunner
- Select Visual Studio in Edit -> Preferences -> External Tools
- Open Visual Studio by selecting Assets -> Open C# Project
- Create a cylinder object in the scene with a scale of (0.1, 0.1, 0.1)
- Create a prefab called Connection from the cylinder
- Unselect the capsule collider component
- Add the prefab to the ScriptRunner and delete the cylinder from the scene
- Create a sphere object in the scene with a scale of (0.1, 0.1, 0.1)
- Select Is Trigger under Sphere Collider
- Add a Rigidbody to the sphere, unset kinematic, unset gravity, set Collision Detection to Continuous Dynamic, and set Interpolation to Interpolate
- Add the Grabbable script to the sphere
- Add the Hand Grab Interactable script to the sphere and set supported grab types to Everything
- Add the Pointable Unity Event Wrapper to the sphere NOT DONE
- Create a prefab called Node from the sphere
- Drag the node prefab to the Node option under Pointable Unity Event Wrapper and select Grabbable
- Add the prefab to the ScriptRunner and delete the sphere from the scene
- Create a cube called ScaleObject in the scene with a scale of (5, 5, 5) and position of (0, 2.5, 0)
- Deselect the Mesh Renderer component to make it invisible
- Add a Rigidbody to the cube, unset kinematic, unset gravity, set Collision Detection to Continuous Dynamic
- Add the Grabbable script to the cube
- Add the Hand Grab Interactable script to the cube and set supported grab types to Pinch
- Add the Two Grab Free Transformer script to the cube
- Drag the Two Grab Free Transformer script to the Two Grab Transformer option under Grabbable
- Add the cube to the ScriptRunner script
- Window -> rendering -> lighting settings -> environment -> skybox material -> none
- Remove the default directional light
Component[] components = gameObject.GetComponents(typeof(Component));
foreach(Component component in components) {
Debug.Log(component.ToString());
}
- Build Settings -> ASTC texture compression
- Quality Settings -> Low quality
- Player Settings -> Graphics API -> OpenGLES3
- Player Settings -> Other Settings -> Configuration -> Scripting Backend -> IL2CPP
- Player Settings -> Other Settings -> Configuration -> Scripting Backend -> ARM64
- XR Plugin Management -> Oculus -> Low Overhead Mode