private void ToggleSceneInternal <TScene>() where TScene : SceneView
 {
     if (!_scenesLoaded.Contains(typeof(TScene)))
     {
         CpUnityExtensions.LoadLevelAdditive <TScene>();
     }
     else
     {
         CpUnityExtensions.UnloadLevelAdditive <TScene>();
     }
 }
예제 #2
0
 public override void Execute(Type sceneType)
 {
     CpUnityExtensions.UnloadLevelAdditive(sceneType, operation =>
     {
         var contextName = CpUnityExtensions.GetSceneName(sceneType);
         if (Rapid.Contexts.FindContext(contextName, out var context, out _))
         {
             Debug.LogWarning(string.Format("Scene <{0}> is being destroyed while its context still exists with <{1}> bindings and <{2}> views.",
                                            contextName, context.BindingCount, context.ViewCount));
         }
     });
예제 #3
0
 public override void Execute()
 {
     Rapid.Bind("Score", 0);
     CpUnityExtensions.UnloadLevelAdditive <GameOverSceneView>();
 }