protected virtual void OnRemoveScene(string id, Scene scene, ISceneUnloadParameters parameters) { if (Description.RegisterApplicationForScenes && ProviderInstance.TryGet(out IProvider <Scene, IApplication> provider)) { provider.Remove(scene); } }
protected virtual void OnUnregisterApplication(Scene scene) { if (ProviderInstance.TryGet(out IProvider <Scene, IApplication> provider)) { provider.Remove(scene); } }
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)); }
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); } }
public IEnumerator Teardown() { SceneManager.LoadScene("SampleScene", new LoadSceneParameters(LoadSceneMode.Single)); if (ProviderInstance.TryGet(out IProvider <Scene, IApplication> provider)) { provider.Clear(); } yield return(null); }