public void SpawnNow() { if (this._prefab) { GoPool.Spawn(this._prefab, this.transform.position, this.transform.rotation, this._parent ? this._parent : this._parentVar?.Transform); } }
void OnDestroy() { if (_instance == null) { _instance = null; Destroy(this.gameObject); } }
void Awake() { if (_instance == null) { _instance = this; } else if (_instance != this) { Destroy(this.gameObject); } }
public void DespawnNow() { GoPool.Despawn(this.gameObject); }