Hi everyone!
I’m trying to use NavMesh.SetAreaCost in a project where i want to change the calculation path in base of a choise of the user.
With a pression of a button in the UI the user can chose the path and after the choise i calculate the path.
The problem is when i call this function it will set the new value of the area afer more than 10 sec!
I really dont know why it’s soo slow!
public class PersonalizzaPercorso : MonoBehaviour
{
public void PercorsoDisabili()
{
NavMesh.SetAreaCost(NavMesh.GetAreaFromName("Scale"), 10000);
}
public void PercorsoNoDisabili()
{
NavMesh.SetAreaCost(NavMesh.GetAreaFromName("Scale"), 1);
}
}