Example #1
0
    // Start is called before the first frame update
    void Start()
    {
        navMeshAgent = this.GetComponent <NavMeshAgent>();

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

        if (navMeshAgent.Equals(null))
        {
            return;
        }
        else
        {
            navMeshAgent.SetDestination(objective.position);
        }
    }