private void Start() { // get the components on the object we need ( should not be null due to require component so no need to check ) agent = GetComponentInChildren <UnityEngine.AI.NavMeshAgent>(); character = GetComponent <ThirdPersonCharacter>(); agent.updateRotation = false; agent.updatePosition = true; _movingPoints = Camera.main.GetComponent <MovingPoints>(); _movingPoints.AddToList(this); _points = new Queue <Transform>(); }
void Start() { _movingPoints = Camera.main.GetComponent <MovingPoints>(); }