public void CmdAddUnit(GameObject obj, GameObject spawner) { NewSpawner newSpawner = spawner.GetComponent <NewSpawner>(); if (newSpawner != null) { newSpawner.unitList.Add(new NewUnitStruct(obj)); newSpawner.isUnitListEmpty = false; } }
public void Awake() { NewSpawner.Instance = this; }