01-05-2024 09:28 AM
The documentation (Docs Link) says:
How can I create a new room with MRUK?
Solved! Go to Solution.
07-05-2024 12:18 AM
You can use OVRScene.RequestSpaceSetup()
05-07-2024 07:31 AM
Hi, any update from Meta about this???
05-07-2024 07:35 AM
Nothing yet
05-07-2024 11:01 AM
Note: I am an Unreal developer, so I apologize if any of this is slightly different to Unity.
You do not create rooms with MRUK, rather MRUK helps get access to rooms that are saved on your headset via the Space Setup app (Settings -> Physical Space -> Space Setup). Setting up the room includes scanning the room to create a 3D mesh representation as well as adjusting planes and adding volumes to represent semantically labelled objects, like walls, floor, tables, etc. This is a completely separate process from your app and can be done prior to running your app. If your app finds no saved room during runtime (i.e. Load Scene fails), you can launch the Space Setup app from inside your app, complete the process, and it will return control to your app, at which time you can use MRUK to access the data.
MRUK also has helper functions to convert a loaded Scene (i.e. room) to a JSON string and load the JSON back again into a Scene, as if it came from the headset. This can be useful for debugging or learning, and the MRUtilityKitSample project has examples of this. I highly recommend checking out the sample, as it also shows how to request the necessary user permissions to access the Scene data.
Once your app has received permission and loaded the Scene from the device, you can do something like MRUKSubsystem.GetCurrentRoom.IsPositionInRoom() to check if a position is inside the walls/floor/ceiling volume.
05-07-2024 11:19 AM
With the OVRSceneManager there is a method to do the scan of the room during tha game. With MRUK I didn’t find anything like that.
05-07-2024 11:26 AM - edited 05-07-2024 11:33 AM
In Unreal, using MRUK v64, it is as simple as calling MRUKSubsystem.LaunchSceneCapture(). Sorry, I don't know the equivalent in Unity. But maybe the function is named similarly.
Edited:
Looking at the Unity documentation, it says you should have an MRUK prefab in your scene. I'm guessing that MRUK singleton is equivalent to Unreal's MRUKSubsystem. If so, I'd think you would call something akin to LaunchSceneCapture on that singleton. Hopefully some knowledgeable Unity developers will jump in here and clear things up! 🙂
05-15-2024 09:04 AM - edited 05-15-2024 09:06 AM
Hi, I have a scene that is working in one room and I would like it to rescan the scene or load a new scene from the device if I move into a new physical room (scanned and present on the device).
I am debugging the efficiency of MRUKRoom.IsPositionInRoom(Vector3 pos) by recoloring the EffectMesh...
But the below code does not what it should... Any Meta ppl can help??? Please...
if (!isInRoom)
{
_effectMesh.MeshMaterial.color = Color.green;
MRUK.Instance.ClearScene();
MRUK.Instance.LoadSceneFromDevice();
}
Thank you.
GL
05-15-2024 09:06 AM - edited 05-15-2024 09:07 AM
Hi,
I have a scene that is working in one room and I would like it to rescan the scene or load a new scene from the device if I move into a new physical room (scanned and present on the device).
I am debugging the efficiency of MRUKRoom.IsPositionInRoom(Vector3 pos) by recoloring the EffectMesh...
But the below code does not what it should... Any Meta ppl can help??? Please...
if (!isInRoom)
{
_effectMesh.MeshMaterial.color = Color.green;
MRUK.Instance.ClearScene();
MRUK.Instance.LoadSceneFromDevice();
}
Thank you.
GL
07-05-2024 12:18 AM
You can use OVRScene.RequestSpaceSetup()
07-05-2024 05:24 AM
I saw that on the latest docs, I think it was added with the v65 or v66