void OnApplicationQuit() { publisher.NotifyMonoQuit(); // release Debug information Debug.Release(); Globals.Instance.QuitGame(); TalkingDataGA.SessionStoped(); ThirdPartyPlatform.CloseSDK(); }
public void Restart() { Debug.Log("[Globals]: Restart begin..."); GameDefines.WriteConfigFile(); //GUIVipStore.WritePendingOrderIds(); ThirdPartyPlatform.CloseSDK(); Debug.Log("[Globals]: Restart call Release()..."); Globals.Instance.Release(); GameObject dontAutoDelObj = GameObject.Find("GlobalScripts"); if (null != dontAutoDelObj) { GameObject.Destroy(dontAutoDelObj); } dontAutoDelObj = GameObject.Find("StaticRes"); if (null != dontAutoDelObj) { GameObject.Destroy(dontAutoDelObj); } dontAutoDelObj = GameObject.Find("UI Root"); if (null != dontAutoDelObj) { GameObject.Destroy(dontAutoDelObj); } dontAutoDelObj = GameObject.Find("CameraControl"); if (null != dontAutoDelObj) { GameObject.Destroy(dontAutoDelObj); } dontAutoDelObj = GameObject.Find("TaskCameraControl"); if (null != dontAutoDelObj) { GameObject.Destroy(dontAutoDelObj); // GameObject.DestroyImmediate(dontAutoDelObj); } Debug.Log("[Globals]: Restart call Application.LoadLevel..."); Application.LoadLevel("SceneStart"); Debug.Log("[Globals]: Restart End..."); }