Mulitple colliders in a script

Please help. All I want is If the Trackable Behavior is detected I want a object to be spawned in another spot if an object is in the intended spot. And I was thinking to use colliders as a reference as to know if a object is in the spot or not. I guess what I’m trying to say is how to call other triggers and check if its triggered and execute a function all while in an if statement.

using UnityEngine;
namespace Vuforia
{
    public class Spawn : MonoBehaviour,
    ITrackableEventHandler
    {
      
        private TrackableBehaviour mTrackableBehaviour;
        public GameObject Monster;                // The enemy prefab to be spawned.
        public Vector3 Zone1V;
        public Vector3 Zone2V;
        public Vector3 Zone3V;
        public Vector3 Zone4V;
        public Vector3 Zone5V;
        public Collider Zone1;
        public Collider Zone2;
        public Collider Zone3;
        public Collider Zone4;
        public Collider Zone5;
        GameObject SpawnedM;
        void Start()
        {
            mTrackableBehaviour = GetComponent<TrackableBehaviour>();
            if (mTrackableBehaviour)
            {
                mTrackableBehaviour.RegisterTrackableEventHandler (this);
            }
        }
        public void OnTrackableStateChanged(
            TrackableBehaviour.Status previousStatus,
            TrackableBehaviour.Status newStatus)
        {
        if (newStatus == TrackableBehaviour.Status.DETECTED ||
            newStatus == TrackableBehaviour.Status.TRACKED ||
            newStatus == TrackableBehaviour.Status.EXTENDED_TRACKED)
                {
                    SpawnedM = Instantiate (Monster, Zone1V, Quaternion.identity) as GameObject;
                    Debug.Log ("Monster Summoned");
                }
            else
                {
                    Destroy(SpawnedM);
                    Debug.Log ("Monster Destroyed");
                }
            }
        }
    }

The trigger box will be in
if (newStatus == TrackableBehaviour.Status.DETECTED ||
newStatus == TrackableBehaviour.Status.TRACKED ||
newStatus == TrackableBehaviour.Status.EXTENDED_TRACKED) statement

One solution is to use one of the Physics functions to check for intersections at each zone. Probably OverlapSphere().

Another solution would be to add a script to each zone that maintains a list of GameObjects currently inside it by adding to the list OnTriggerEnter and removing from the list OnTriggerExit. Then inside your Spawn script, query the state of each zone’s list and act accordingly.

How would I query the state of each zone and do it accordingly.

The second solution?

Just use GetComponent() on the zone GameObject and evaluate the list (something like list.Count == 0 assuming you want the zone empty).

I’m a noobie can you please explain what list.count=0 means i would appreciate it.

It’s the number of elements in the list. Are you not familiar with the List class? It’s like an array but dynamically sized.

You should also hide this implementation in a method on the class with the list. That makes it much easier if you decide to change the collection type or method of checking zones later.

Edit: Just reread the OPs other post. This advice might be overkill at this stage.