Closed AndreasLrx closed 1 year ago
Here is demo for you https://github.com/h8man/RedHotSweetPepper including runtime
Thank you I haven't seen this.
All I was missing was to add a RootSource.
NavMeshSurface navMeshInstance = Instantiate(navMeshSurface);
navMeshInstance.GetComponent<RootSources2d>().RooySources.Add(boardHolder.gameObject);
navMeshInstance.BuildNavMesh();
However as you can see, there is a typo in the RootSources2d script: RooySources
instead of RootSources
https://github.com/h8man/NavMeshPlus/blob/master/NavMeshComponents/Scripts/RootSources2d.cs#L19
fixed
I am trying to bake my mesh at runtime because I am making procedural room generation and therefore can't bake the nav mesh in the editor.
I tried to simply
However I got a debug log telling me I have 0 sources. My
NavMeshModifier.activeModifiers.Count
is not equal to 0 (~300).I'm reading the scripts since two hours and still can't find anything to help me, and any tutorials I see are on editor and not on runtime. I'm not familiar with unity navigation mesh so excuse me if I'm making beginner mistakes.
Whatever the issue is, I think it would be great to add a section in the readme/doc to explain how to generate the mesh at runtime (in case it's not possible at editor time)