This sample project will help you navigate and understand the MR Utility Kit APIs through a collection of samples that. Feel free to delve into these APIs, try them out, and discover creative ways to apply them in your projects.
The Oculus License applies to the samples.
This project was built using the Unity engine.
MR Utility Kit provides a rich set of utilities and tools on top of Scene API to perform common operations when building spatially-aware apps. This makes it easier to program against the physical world, and allows developers to focus on what makes their app unique.
The utilities provided broadly fall into 3 categories: Scene Queries, Graphical Helpers, Development Tools.
More information on MR Utility Kit can be found on our developer website.
- MRUKBase: A basic scene showing the core functionality of MR Utility Kit leveraging the EffectMesh prefab to visualize the scene data.
- Floor Zone: A scene showing how to find a floor zone unobstructed by other scene anchors.
- Multi Spawn: A scene showing how to spawn objects in different locations within the room.
- Nav Mesh: A scene showing how to create a nav mesh for navigation leveraging the scene data.
- Virtual Home: A scene showing how to reskin a room using the prefab spawner functionality.
- Passthrough Relighting: A scene showing the effect of virtual shadows and highlights on scene objects.
- Scene Decorator: A scene with basic decorations and SceneDecorator to populate the environment.
- Destructible Mesh: A scene showing how to spawn a global mesh that can be segmented, usually used to create destructible environments.
- Environment Panel Placement (Beta): A scene showing how to use EnvironmentRaycastManager to attach virtual panel to the physical environment.
- Space Map: A scene with the SpaceMap prefab added. It creates a texture which represents the room with a color gradient according to the settings of the prefab.
- Keyboard Tracking: A scene demonstrating generic keyboard detection and tracking.
- Bouncing Ball: A scene showing virtual balls interacting with the physical environment.
More information on all samples can be found on our developer website.
Clone this repo using the "Code" button above, or this command:
git clone https://github.com/oculus-samples/Unity-MRUtilityKitSample.git
- Make sure you're using Unity 2022.3.15f1 or newer.
- In the Project window, navigate to Assets/MRUKSamples/.
- Click on individual scenes.
- Click Play button to explore scene functionality in Unity.
- Navigate to File > Build Settings.
- Select the sample scene that you want to test on device.
- Build an apk.
- Navigate to build destination folder and copy the APK to your device using Meta Quest Developer Hub.
All Meta SDKs can be found in the Unity Asset Store. This project depends on SDKs defined in the Packages/manifest.json:
-
Make sure your project uses the same SDK version
-
Move the samples to your project
Copy Samples directory
- Copy Assets/MRUKSamples directory to your own project
Create UnityPackage and Import it
- Open Unity-MRUtilityKitSample project in Unity
- Right-click on Assets/MRUKSamples and select Export Package...
- Save package in an easy location to retrieve
- Open your own project (where you want the samples to be added)
- Click on Assets->Import Package->Custom Package... from the menu bar
- Find the package we saved in step 3 and click Open
The Oculus License applies to the SDK and supporting material. The MIT License applies to only certain, clearly marked documents. If an individual file does not indicate which license it is subject to, then the Oculus License applies.