public static void StartUp() { if (sm_GameController == null) { DontDestroyHandler.CreateComponent <GameController>(); } }
protected override void DoInit() { rootTransform = DontDestroyHandler.CreateTransform(ROOT_NAME); SpawnPool spawnPool = PoolManager.GetInstance().GetSpawnPool(CONTROLLER_SPAWN_NAME, true); effectControllerPool = spawnPool.CreateGameObjectPool(CONTROLLER_POOL_PATH, GetEffectControllerTemplate(), PoolTemplateType.RuntimeInstance); effectControllerPool.IsAutoClean = false; effectControllerPool.PreloadTotalAmount = 20; effectControllerPool.PreloadOnceAmount = 2; effectControllerPool.completeCallback = OnInitComplete; }
static void OnStartup() { sm_Updater = DontDestroyHandler.CreateComponent <UpdateBehaviour>(NAME); }
protected override void DoInit() { m_CachedTransform = DontDestroyHandler.CreateTransform("PoolManager"); m_CullTimerTask = TimerManager.GetInstance().AddIntervalTimer(m_CullTimeInterval, OnCullTimerUpdate); }