Mixed Reality Utility Kit - Managing scene with MRUK
Updated: Mar 13, 2025
After completing this section, the developer should:
- Understand the purpose of the MRUK prefab to establish scene information
- Understand how to reduce anchor management complexity by using World Locking
- Understand how to use different options like prefabs for fallback cases where scene information isn’t available.
- Understand how to control the ordering of scripts using MRUK so that you can ensure certain order-dependent capabilities are accomplished in the right order.
The first step in understanding the scene is scene capture. Space Setup is the system flow that generates a Scene Model. Users can navigate to Settings > Physical Space > Space Setup to capture their scene. The system will assist the user in capturing their environment, providing a manual capture experience as a fallback. If you have enabled Load Scene on Startup and the user has not yet set up their space then MRUK will trigger the space setup flow. You may also manually trigger the space setup flow by making a call to OVRScene.RequestSpaceSetup.
Note: You currently cannot perform Space Setup over Link. You must perform Space Setup on-device prior to loading the Scene Model over Link.
The MRUK prefab is the home for the MRUK script which allows you to control several aspects of the scene which we will discuss in the next sections. Some of the important settings from the prefab are shown below.
Stabilizing the Scene with the Real World
World locking is a feature of MRUK that makes it easier for developers to keep the virtual world in sync with the real world. This is enabled by a checkbox on the MRUK prefab. Virtual content can be placed arbitrarily in the scene without needing to explicitly attach it to anchors. MRUK takes care of keeping the camera in sync with the real world using scene anchors under the hood. This is achieved by making small, imperceptible adjustments to the camera rig’s tracking space transform, optimizing it so that nearby scene anchors appear in the right place.

Previously with OVRSceneManager, the recommended method to keep the real and virtual world in sync was to ensure that every piece of virtual content is attached to an anchor. This meant that nothing could be considered static and would need to cope with being moved by small amounts every frame. This can lead to a number of issues with networking, physics, rendering, etc. When world locking is enabled, virtual content can remain static. The space close to the player will remain in sync however the trade off is that space further away may diverge from the physical world by a small amount.
World locking is enabled by default but can be disabled by setting EnableWorldLock to false on the MRUK instance. If you need to maintain control of the camera position in your app, for example, when doing multiplayer co-location then you can disable world locking using this setting.
Data Source for the Scene
Set up the scene to load on startup by selecting the startup checkmark. The Data Source in the MRUK component allows you to test using the prefab settings or to test on the device. There are even options for using the device information first and then falling back to a prefab if it isn’t found. The prefabs are provided so that you can test your app in a variety of settings without changing rooms.
Another important feature of the MRUK component is to control the execution of scripts to set up the room. The
Floor Example shows one example of this. By scripts to fire on the scene loaded event, this example shows how to sequentially use two different components of the Effect Mesh to decorate first basic wall components and then the volumes discovered. The third through fifth scripts then use FindSpawnPositions to selectively place different-sized circles on the floor or surfaces.