private Transform player; // Reference to the player's transform. void Awake() { myTransform = transform; bossSight = GetComponent <BossSight>(); nav = GetComponent <NavMeshAgent>(); player = GameObject.FindGameObjectWithTag("Player").transform; }
private Transform player; // Reference to the player's transform. #endregion Fields #region Methods void Awake() { myTransform = transform; bossSight = GetComponent<BossSight>(); nav = GetComponent<NavMeshAgent>(); player = GameObject.FindGameObjectWithTag("Player").transform; }