public void onGameLoadEventHandle(IDispatchObject dispObj) { ResItem res = dispObj as ResItem; if (res.refCountResLoadResultNotify.resLoadState.hasSuccessLoaded()) { Ctx.m_instance.m_layerMgr.m_path2Go[ModulePath.GAMEMN] = res.InstantiateObject(m_type2ItemDic[ModuleID.GAMEMN].m_path); Ctx.m_instance.m_layerMgr.m_path2Go[ModulePath.GAMEMN].name = ModuleName.GAMEMN; Ctx.m_instance.m_layerMgr.m_path2Go[NotDestroyPath.ND_CV_Game].transform.parent = Ctx.m_instance.m_layerMgr.m_path2Go[NotDestroyPath.ND_CV_Root].transform; // 游戏模块也不释放 UtilApi.DontDestroyOnLoad(Ctx.m_instance.m_layerMgr.m_path2Go[NotDestroyPath.ND_CV_Game]); // 立马卸载这个资源 Ctx.m_instance.m_resLoadMgr.unload(m_type2ItemDic[ModuleID.GAMEMN].m_path, onGameLoadEventHandle); } else if (res.refCountResLoadResultNotify.resLoadState.hasFailed()) { onModuleFailed(dispObj); } }