Using an “Agent Type” other than the built-in “Humanoid”, causes Unity to fail at NavMeshAgent creation and outputs the following warning to the Console window:
Any call to drive the NavMeshAgent then fails as well, with errors like:
Please see the video that is attached to the bug-report.
Reproduce
- Open user project
- Open Assets/Scene.unity
- Select “My Agent” in Hierarchy and notice its “Agent Type = Humanoid”
- Press play and click somewhere in the screen
Observe the agent moves around, which is the expected behavior.
- Press stop
- Change “Agent Type” to “Robot”
- Press play and click somewhere in the screen
Observe the agent does not move, but outputs warnings and errors to the Console window.
- Press Stop
- Open Window/Navigation and switch to the “Agents” tab
- Compare the “Humanoid” and “Robot” agent types
Observe that their values are the same. Only the name is different.
Expected
Using custom “Agent Types” should not break the navigation system. Please also see the following feedback items I created, which are related to this:
Improve “SetDestination can only be called on an active agent that has been placed on a NavMesh.” error
https://feedback.unity3d.com/suggestions/improve-setdestination-can-only-be-called-on-an-active-agent-that-has-been-placed-on-a-navmesh-dot-error
Improve “Failed to create agent because it is not close enough to the NavMesh” warning
https://feedback.unity3d.com/suggestions/improve-failed-to-create-agent-because-it-is-not-close-enough-to-the-navmesh-warning