/*void OnEnable() { #if UNITY_EDITOR EditorApplication.playmodeStateChanged += StateChange; #endif } #if UNITY_EDITOR void StateChange() { if (EditorApplication.isPlayingOrWillChangePlaymode && EditorApplication.isPlaying) { } } #endif void OnDisable() { #if UNITY_EDITOR EditorApplication.playmodeStateChanged -= StateChange; #endif }*/ void Awake() { if (m_Instance != null) { Debug.LogError("An instance of AwesomiumUnityWebCoreHelper already exists!"); DestroyImmediate(this); } m_Instance = this; AwesomiumUnityWebCore.EnsureInitialized(); DontDestroyOnLoad(this.gameObject); }
/*void OnEnable() * { #if UNITY_EDITOR * EditorApplication.playmodeStateChanged += StateChange; #endif * } * #if UNITY_EDITOR * void StateChange() * { * if (EditorApplication.isPlayingOrWillChangePlaymode && EditorApplication.isPlaying) { * * } * * } #endif * * * void OnDisable() * { #if UNITY_EDITOR * EditorApplication.playmodeStateChanged -= StateChange; #endif * }*/ void Awake() { if (m_Instance != null) { Debug.LogError("An instance of AwesomiumUnityWebCoreHelper already exists!"); DestroyImmediate(this); } m_Instance = this; AwesomiumUnityWebCore.EnsureInitialized(); DontDestroyOnLoad(this.gameObject); }
void OnDestroy() { DoShutdown(); m_Instance = null; }
void OnApplicationQuit() { DoShutdown(); m_Instance = null; }