Example #1
0
 protected override void OnEnable()
 {
     base.OnEnable();
     if (!eTarget.TriggerZonePrefab)
     {
         SM_SpawnTrigger _triggerAsset = Resources.Load <SM_SpawnTrigger>(triggerSpawnAssetName);
         if (_triggerAsset)
         {
             eTarget.TriggerZonePrefab = _triggerAsset;
         }
     }
     Tools.current = Tool.None;
 }
Example #2
0
    void SpawnAll()
    {
        if (!TriggerZonePrefab)
        {
            return;
        }

        for (int i = 0; i < SpawnPoints.Count; i++)
        {
            SM_SpawnTrigger _trigger = Instantiate(TriggerZonePrefab);
            if (_trigger)
            {
                _trigger.SetData(SpawnPoints[i]);
            }
        }
    }