-
Notifications
You must be signed in to change notification settings - Fork 243
Open
Description
May be user error, but I can't seem to fix despite copying the example scene exactly.
It collects the sources but for some reason does not cache them, despite them containing nav modifiers. This then stops me from being able to update the sources when they change position or are removed

I use the following code to create and update the navmesh
private IEnumerator StartNavMesh()
{
if (navMeshSurface.useGeometry == NavMeshCollectGeometry.PhysicsColliders)
{
yield return new WaitForFixedUpdate();
}
navMeshSurface.BuildNavMesh();
yield return null;
}
public void UpdateNavMesh(GameObject source)
{
cacheSources2D.RemoveSource(source);
if (cacheSources2D.IsDirty)
{
cacheSources2D.UpdateNavMesh();
}
}
The surface is a tilemap with a tilemap modifier, and it uses 3D objects with modifiers to mark the non-walkable areas
Metadata
Metadata
Assignees
Labels
No labels