Hello,
This is my first post on Unity’s forum so please, if you have any feedbacks on my post, I would be glad to hear them out.
I’m currently on a project where I take .ifc files to generate at runtime structures of buildings/houses in Unity.
I generate NavMeshSurface in the accessible floor areas.
My mission is to define a cylinder based agent (- you can scale his height and radius -) and then choose a startpoint and an endpoint to check if he can do the entire path with his dimensions (using NavMeshAgent.CalculatePath()).
I’m struggling to do it because I’m trying to access the NavMeshBuildSettings.agentRadius and the NavMeshBuildSettings.agentHeight of my existing NavMeshBuildSettings but it seems impossible at runtime.
I found another solution that would be creating a new NavMeshBuildSettings with new parameters ( - still in runtime - ) and then assign my existing NavMeshSurface ID and my NavMeshAgent ID with the new NavMeshBuildSettings.agentTypeID.
I have no problem creating NewSettings but when I try to modify the parameters, no modifications are taken in account.
I already found similar threads (i.e NavMesh.CreateSettings() not allowing changes ) saying that it was not possible to access NavMeshBuildSettings parameters.
Is there something I misunderstood in the NavMesh universe ? Do I need to go with another pathfinding solution like A* (A* Pathfinding Project Pro) ?
I’m still available if you need more informations.
Adrien