| 1234567891011121314151617181920212223242526 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using UnityEngine.SceneManagement;
- using JCUnityLib;
- public class ViewMgr : ViewManager<ViewMgr>
- {
- protected override void OnInited()
- {
- //设置视图组
- SetViewGroup<HomeFrameView>(1);
- }
- //以下名称的预制体通过SceneResourceManager获取
- HashSet<string> scenePrefabs = new HashSet<string>(new string[] {
- //Home
- "TopBarView", "HomeView", "GameStartView", "ChallengeOptionView",
- "PKGameOptionView", "PKMatchView", "RoleSelectView"
- });
- protected override GameObject LoadViewPrefab(string viewName)
- {
- if (scenePrefabs.Contains(viewName)) return SceneResourceManager.Instance.GetPrefab(viewName);
- return base.LoadViewPrefab("Home/" + viewName);
- }
- }
|