public void Process(float deltaTime) { if (ProcessRecycle(false)) { GameApp.Instance().UnloadUnusedAsset(); } }
void OnEventCallBack(int nEventID, object param) { if (nEventID == (int)Client.GameEventID.ENTITYSYSTEM_LEAVEMAP) { GameApp.Instance().OnLowMemoryWarning(); } }
public void DoLoad() { DataManager.Manager <UIPanelManager>().ShowLoading(progress: 0); DataManager.Manager <UIManager>().ChangeUISceneState(UIManager.UISceneState.USS_Ingame); // 创建Camera GameApp.Instance().CreateMainCamera(true); CoroutineMgr.Instance.DelayInvokeMethod(0.1f, DoLoading); }
// Use this for initialization void Start() { string strRootName = transform.gameObject.name; GameObject root = transform.gameObject; m_RareApp = GameApp.Instance(); #if UNITY_ANDROID && !UNITY_EDITOR MethodInfo mi = mainType.GetMethod("Init"); mi.Invoke(m_RareApp, new object[] { root }); #else m_RareApp.Init(ref root); #endif if (Application.isEditor) { // root.AddComponent<NetDataMonitor>(); } Engine.Utility.EventEngine.Instance().AddEventListener((int)Client.GameEventID.ENTITYSYSTEM_LEAVEMAP, OnEventCallBack); }
/// <summary> /// 释放没有使用的资源 /// </summary> private void DoLowMemory() { DataManager.Manager <CMResourceMgr>().OnLowMemory(); GameApp.Instance().UnloadUnusedAsset(true); }
void onClick_LowMemory_Btn(GameObject caster) { GameApp.Instance().OnLowMemoryWarning(); }