void Start() { raycast = GetComponent <ConeRaycast>(); spotLight = GetComponentInChildren <Light>(); spotLight.range = raycast.range; spotLight.spotAngle = raycast.angle; }
void Start() { agent = GetComponent <NavMeshAgent>(); raycast = GetComponent <ConeRaycast>(); if (patrolCheckpoints.Length == 0) { Debug.LogWarning(gameObject.name + ": Patrol Checkpoints List is empty!"); return; } }