public void Clear() { _updates.Clear(); _fixedUpdates.Clear(); _lateUpdates.Clear(); GameObject.Destroy(_updater.gameObject); _updater = null; }
public void Prepare() { var updaterGO = new GameObject("UpdateManager"); GameObject.DontDestroyOnLoad(updaterGO); _updater = updaterGO.AddComponent <UpdateManagerBehaviour>(); _updater.Init(OnUpdate, OnFixedUpdate, OnLateUpdate); IsReady = true; }