- Home /
Question by
tormentoarmagedoom · Sep 28, 2019 at 02:57 PM ·
navmeshnavigationarea
Change nav mesh area of a Nav static object via code??
Hello everybody!!!
The question is simple, as you know, yuo can create nav mesh areas by makeing objects "navigations static". then you can change in the inspector the area where that object belongs. As shown in the image :
The question is simple. How can i change this area where the object belongs with code? so then just need to use NavMeshBuilder.UpdateNavMeshData() to update that data.
Thanks in advance!!!
asdafs.jpg
(30.0 kB)
Comment
Answer by Mouton · Sep 29, 2019 at 10:42 AM
You need to access to your NavMesh's NavMeshBuildSource (https://docs.unity3d.com/ScriptReference/AI.NavMeshBuildSource.html) and update the area
property.