UnityEngine.AI.NavMeshAgent to declare NavmeshAgent?

Is it a new thing?

I upgraded from 5.4 to 5.5, and now I see my declaring changed from NavMeshAgent to UnityEngine.AI.NavMeshAgent.

If I want to declare a new NavMeshAgent variable, I have to use the name space or it won’t work.

I also switched from monodevelop to visual studio, can it be the cause?

Thank you.

Unity is slowly upgrading the various systems to seperate namespaces. It’s generally good practice with coding. Expect to see more of it in the future.

It’s from the automatic upgrade.

Why Unity went with a find-replace for NavMeshAgent with AI.NavMeshAgent instead of just importing UnityEngine.AI is another question. Idk.

Oh Damn, it might be good practicice but I’m not a fan of it. :slight_smile:

Thanks guys for the answer!