API reference
API reference
Select your platform
No SDKs available
No versions available

MRUKSettings Class

Represents the settings for the <see cref"MRUK"/> instance, including data source configurations, startup behaviors, and other scene related settings.
These settings are serialized and can be modified in the Unity Editor from the <see cref"MRUK"/> component.

Fields

Where to load the data from.
The index (0-based) into the RoomPrefabs or SceneJsons array determining which room to load.
-1 is random.
The list of prefab rooms to use.
when <see cref"SceneDataSource"/> is set to Prefab or DeviceWithPrefabFallback. The MR Utilty kit package includes a few sample rooms to use as a starting point for your own scene. These rooms can be modified in the Unity editor and then saved as a new prefab.
The list of JSON text files with scene data to use when <see cref"SceneDataSource"/> is set to JSON or DeviceWithJSONFallback.
The MR Utilty kit package includes a few serialized sample rooms to use as a starting point for your own scene.
Trigger a scene load on startup.
If set to false, you can call LoadSceneFromDevice(), LoadScene or LoadSceneFromJsonString() manually.
The width of a seat.
Used to calculate seat positions with the COUCH label. Default is 0.6f.

Properties

The requested configuration of the tracking service.
This property represents the requested tracker configuration (which types of trackables to track). It is possible that some configuration settings may not be satisfied (for example, due to lack of device support). MRUK.TrackerConfiguration represents the true state of the system.
Invoked when a newly detected trackable has been localized.
When a new OVRAnchor has been detected and localized, a new GameObject with a MRUKTrackable is created to represent it. Its transform is set, and then this event is invoked.Subscribe to this event to add additional child GameObjects or further customize the behavior.This example shows how to create a MonoBehaviour that instantiates a custom prefab:
class MyCustomManager : MonoBehaviour
{
public GameObject Prefab;
publicvoid OnTrackableAdded(MRUKTrackable trackable)
    {
        Instantiate(Prefab, trackable.transform);
    }
}
Invoked when an existing trackable is no longer detected by the runtime.
When an anchor is removed, no action is taken by default. The MRUKTrackable, if any, is not destroyed or deactivated. Subscribe to this event to change this behavior.Once this event has been invoked, the MRUKTrackable's anchor (MRUKTrackable.Anchor) is no longer valid.
Did you find this page helpful?
Thumbs up icon
Thumbs down icon