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; }
void SpawnAll() { if (!TriggerZonePrefab) { return; } for (int i = 0; i < SpawnPoints.Count; i++) { SM_SpawnTrigger _trigger = Instantiate(TriggerZonePrefab); if (_trigger) { _trigger.SetData(SpawnPoints[i]); } } }