06-09-2024 10:52 AM
I am building a game the leverages navmesh in multiple rooms but no matter how many things I change the SDK doesn’t seems to generate more than 1 room navmesh at the same time.
The Scene Navigation component is set to ALL ROOMS. I can provide any logs necessary. The project is using the latest v65 SDK and is running on the latest unity 6 preview version.
08-04-2024 02:11 PM
Hey mate,
I'm having the exact same problem with the same things.
Unity Meta SDK v67.
-All the (Building Block) Find Spawn Location objects spawn in ALL rooms. Same as all the other official scripts.
-The Nav Mesh Example scene runs fine in 1 room. With the same setting you mentioned it only spawns in 1 single room.
- The "All Rooms" Option seems to do nothing, Maybe it does generate meshes in all rooms but the Agents cant access those.
+I tried setting the Scene Obstacles to not include Doors and Invisible walls but its all the same.
Note: To build the next evolution of Mixed Reality we require robust tools. Myself and other developers are already pushing everything forward but even the officially announced and supported tools don't work.
Any chance you can pass this on to someone deep in Meta or Unity @neurodivrgent @MetaQuestSupport
08-04-2024 02:37 PM
hey . thanks for the reply. Yep as you described, its the same problem. I tried making a script that shuffles through every room and builds navmesh for it but it always crashes or freezes the application. So for now , meta SDK is no good for us 😄
08-05-2024 12:45 AM
Yep. I had sincerely hoped you had found something in the time from when you posted this to when I replied.
I think they're nearly there with it. Their other Building Blocks work flawlessly. There must be a reason this is just an example and not a building block.
I'll dig through the scripts in the Nav Mesh example and try to extract just the code that bakes the navmesh and triangulates it.
08-14-2024 01:42 PM
public void BuildSceneNavMeshForRoom(MRUKRoom room = null)
{
CreateNavMeshSurface(); // in case no NavMeshSurface component was found, create a new one
RemoveNavMeshData(); // clean up previous data
//YAGO var navMeshBounds = ResizeNavMeshFromRoomBounds(ref _navMeshSurface); // resize the nav mesh to fit the room
var navMeshBounds = new Bounds(gameObject.transform.position, gameObject.transform.localScale * 100f);
var navMeshBuildSettings = CreateNavMeshBuildSettings(AgentRadius, AgentHeight, AgentMaxSlope, AgentClimb);
if (!ValidateBuildSettings(navMeshBuildSettings, navMeshBounds))
{
return;
}
CreateObstacles(room);
var data = CreateNavMeshData(navMeshBounds, navMeshBuildSettings, room);
_navMeshSurface.navMeshData = data;
_navMeshSurface.agentTypeID = navMeshBuildSettings.agentTypeID;
_navMeshSurface.AddData();
InitializeNavMesh(navMeshBuildSettings.agentTypeID);
}
08-14-2024 01:47 PM
Ayoo, thank you so much for this solution! I hope we get an official fix for this in at least in v182 update 😛