예제 #1
0
        public async Task <T> LoadUIAsync <T>() where T : class
        {
            string     path = UIPath.GetPath <T>();
            GameObject go   = await Addressables.LoadAssetAsync <GameObject>(path).Task;

            go = MonoBehaviour.Instantiate(go);
            UIConsole.InsertUI(go.transform);
            T ui = go.GetComponent <T>();

            UIs.Add(typeof(T), go);
            return(ui);
        }