Search Unity

Question How create agent outside of NavMesh?

Discussion in 'Navigation' started by Vefery, Nov 24, 2020.

  1. Vefery

    Vefery

    Joined:
    Feb 23, 2018
    Posts:
    119
    I have NavMeshAgent component attached to the player, at some point of the game in specific locations controls can be locked and character runs to a random nearby point (agent is for this reason). The problem is that there are few such locations and they're not connected and spawnpoint isn't on the NavMesh. So I get "Failed to create agent" warning when I start and player doesn't move even when he is on the NavMesh.
    Is there a way to create agent manually runtime?
     
  2. Vefery

    Vefery

    Joined:
    Feb 23, 2018
    Posts:
    119
    Anyone?