// Start is called before the first frame update void Start() { navMeshAgent = this.GetComponent <NavMeshAgent>(); if (navMeshAgent.Equals(null)) { Debug.Log("no navmesh"); } else { SetDestination(); } }
// Start is called before the first frame update void Start() { navMeshAgent = this.GetComponent <NavMeshAgent>(); if (navMeshAgent.Equals(null)) { return; } else { navMeshAgent.SetDestination(objective.position); } }