Ejemplo n.º 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();
        }
    }
Ejemplo n.º 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);
        }
    }