private void Awake() { if (instance != null && instance != this) { Destroy(this.gameObject); return; } else { instance = this; } }
void Awake() { if (instance != null && instance != this) { Destroy(this.gameObject); return; } else { instance = this; } mySpawnPositions = new List <Transform> (this.gameObject.GetComponentsInChildren <Transform> ()); mySpawnPositions.Remove(this.transform); }