Example #1
0
    void Start()
    {
        raycast   = GetComponent <ConeRaycast>();
        spotLight = GetComponentInChildren <Light>();

        spotLight.range     = raycast.range;
        spotLight.spotAngle = raycast.angle;
    }
Example #2
0
    void Start()
    {
        agent   = GetComponent <NavMeshAgent>();
        raycast = GetComponent <ConeRaycast>();

        if (patrolCheckpoints.Length == 0)
        {
            Debug.LogWarning(gameObject.name + ": Patrol Checkpoints List is empty!");
            return;
        }
    }