void Init() { GameObject gUI = GameObject.Find("GameUI"); if (gUI == null) { gUI = new GameObject("GameUI"); } CoreEntry.InitUI(); }
public void OnLevelWasLoaded(int level) { Scene loadedScene = SceneManager.GetActiveScene(); if (!loadedScene.name.Equals("loadingscene") && !loadedScene.name.Equals("LoginOut")) { int curSceneId = MapMgr.Instance.GetCurSceneID(); //第一个场景ID if (curSceneId > 0) { CoreEntry.InitUI(); if (ModuleServer.MS.GSkillCastMgr != null) { ModuleServer.MS.GSkillCastMgr.Enable(); } MainPanelMgr.Instance.uiCamera.cullingMask = 1 << LayerMask.NameToLayer("UI"); LoadSceneObjects(curSceneId); CoreEntry.gEventMgr.TriggerEvent(GameEvent.GE_AFTER_LOADSCENE, EventParameter.Get(curSceneId)); } } }