public static void LocalReset() { //AudioTrackService.ClearAllAudio(); SFXService.ClearConstructed(); Events.Event0.DestroyAll(); ETime.Slowdown.RevokeAll(MultiOp.Priority.CLEAR_SCENE); ETime.Timer.DestroyAll(); BehaviorEntity.DestroyAllSummons(); PublicDataHoisting.DestroyAll(); FiringCtx.ClearNames(); ReflWrap.ClearWrappers(); StateMachineManager.ClearCachedSMs(); BulletManager.ClearPoolControls(); BulletManager.ClearEmpty(); BulletManager.ClearAllBullets(); BulletManager.DestroyCopiedPools(); InstanceData.CampaignDataUpdated.Proc(); #if UNITY_EDITOR || ALLOW_RELOAD Events.LocalReset.Proc(); #endif //Ordered last so cancellations from HardCancel will occur under old data Instance = new InstanceData(InstanceMode.NULL); Debug.Log($"Reloading level: {Difficulty.Describe()} is the current difficulty"); UIManager.UpdateTags(); }
public static void ClearForScene() { AudioTrackService.ClearAllAudio(false); SFXService.ClearConstructed(); BulletManager.ClearPoolControls(); Events.Event0.DestroyAll(); ETime.Slowdown.RevokeAll(MultiOp.Priority.CLEAR_SCENE); ETime.Timer.DestroyAll(); BulletManager.OrphanAll(); PublicDataHoisting.DestroyAll(); FiringCtx.ClearNames(); //SMs may have links to data hoisting, so we destroy both of them on phase end. ReflWrap.ClearWrappers(); StateMachineManager.ClearCachedSMs(); BehaviorEntity.ClearPointers(); AyaPhoto.ClearTextures(); }