private static void OnSceneUnloaded(Scene arg0) { m_loadedScenes--; if (m_loadedScenes == 0) { m_instance = null; } }
private static void Init() { IProject project = null; IOC.RegisterFallback(() => { if (project == null) { RTSLDeps deps = FindObjectOfType <RTSLDeps>(); if (deps == null) { GameObject go = new GameObject("RTSL"); go.transform.SetSiblingIndex(0); deps = go.AddComponent <RTSLDeps>(); project = deps.Project; } } return(project); }); }
private static void OnSceneUnloaded(Scene arg0) { m_instance = null; }