コード例 #1
0
 protected virtual void OnRemoveScene(string id, Scene scene, ISceneUnloadParameters parameters)
 {
     if (Description.RegisterApplicationForScenes && ProviderInstance.TryGet(out IProvider <Scene, IApplication> provider))
     {
         provider.Remove(scene);
     }
 }
コード例 #2
0
 protected virtual void OnUnregisterApplication(Scene scene)
 {
     if (ProviderInstance.TryGet(out IProvider <Scene, IApplication> provider))
     {
         provider.Remove(scene);
     }
 }
コード例 #3
0
        protected virtual SceneInstance OnAddScene(string id, Scene scene, ISceneLoadParameters parameters)
        {
            if (Description.RegisterApplicationForScenes && ProviderInstance.TryGet(out IProvider <Scene, IApplication> provider) && !provider.Entries.ContainsKey(scene))
            {
                provider.Add(scene, Application);
            }

            return(new SceneInstance(scene, id));
        }
コード例 #4
0
        protected virtual void OnRegisterApplication(Scene scene, IContext context)
        {
            if (ProviderInstance.TryGet(out IProvider <Scene, IApplication> provider) && !provider.Entries.ContainsKey(scene))
            {
                var application = context.Get <IApplication>();

                provider.Add(scene, application);
            }
        }
コード例 #5
0
        public IEnumerator Teardown()
        {
            SceneManager.LoadScene("SampleScene", new LoadSceneParameters(LoadSceneMode.Single));

            if (ProviderInstance.TryGet(out IProvider <Scene, IApplication> provider))
            {
                provider.Clear();
            }

            yield return(null);
        }