void Awake() { Ins = this; //if (!InitGlobalIns()) return; GlobalManager.AddToDisabledObjContainer(this); GameEventSignals.OnEnemySpawned += OnEnemySpawned; GameEventSignals.OnSceneConfigured += OnSceneConfigured; }
bool InitGlobalIns() { if (Ins == null) { Ins = this; } else if (Ins != this) { DestroyImmediate(gameObject); return(false); } DontDestroyOnLoad(gameObject); return(true); }