using Cysharp.Threading.Tasks; using System.Collections; using System.Runtime.CompilerServices; using System.Threading.Tasks; using UnityEngine; public static class Framework { internal static GameObject console; /// /// UI /// public static UIManager uiMgr { get; private set; } = new UIManager(); public static FairyGuiManager fguiMgr { get; private set; } = new FairyGuiManager(); public static ResManager res { get; private set; } = new ResManager(); /// /// socket /// public static NetworkManager network { get; private set; } = new NetworkManager(); public static MessageManager message { get; private set; } = new MessageManager(); public static StorageManager storage { get; private set; } = new StorageManager(); public static AudioManager audioManager { get; private set; } = new AudioManager(); public static DeviceInfoManager device { get; private set; } = new DeviceInfoManager(); /// /// Http /// public static HttpRequestManager httpRequest { get; private set; } = new HttpRequestManager(); public static LogManager logMgr { get; private set; } = new LogManager(); public static UpdateController updateController { get; set; } // public static UI_VersionUpdate ui_versionUpdate; public static async UniTask Init(GameObject ga, GameObject console) { Debug.Log("初始化"); Framework.console = console; //Object.DontDestroyOnLoad(ga); updateController = ga.AddComponent(); await res.Init(); uiMgr.Init(GameObject.Find("Gui/Canvas").GetComponent(), GameObject.Find("Gui/Camera").GetComponent()); //await fguiMgr.Init(); // ui_versionUpdate = Framework.uiMgr.SetPanel(uiMgr.uiRoot.parent.Find("UI_VersionUpdate")); await UITool.Init(); //network.Init(); // await rpcNetWorkMgr.Init(); device.InitDeviceInfo(); } }