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!!!

You need to access to your NavMesh’s NavMeshBuildSource (Unity - Scripting API: NavMeshBuildSource) and update the area property.