UI框架开发中

This commit is contained in:
2025-09-29 07:45:07 +08:00
parent 423ad80303
commit 71edbb6088
39 changed files with 1191 additions and 397 deletions

View File

@@ -10,7 +10,7 @@ public class GameStart : MonoBehaviour
{
DontDestroyOnLoad(gameObject);
StartCoroutine(LoadScene());
StartCoroutine(LoadUIManager());
//StartCoroutine(LoadUIManager());
}
IEnumerator LoadScene()
{
@@ -23,17 +23,17 @@ public class GameStart : MonoBehaviour
};
yield return sceneHandle;
}
IEnumerator LoadUIManager()
{
AssetHandle _handle = YooAssets.LoadAssetAsync<GameObject>("UIManager");
_handle.Completed += (handle) =>
{
GameObject go = Instantiate((GameObject)_handle.AssetObject);
DontDestroyOnLoad(go);
Debug.Log(_handle.AssetObject);
};
yield return _handle;
}
//IEnumerator LoadUIManager()
//{
// AssetHandle _handle = YooAssets.LoadAssetAsync<GameObject>("UIManager");
// _handle.Completed += (handle) =>
// {
// GameObject go = Instantiate((GameObject)_handle.AssetObject);
// DontDestroyOnLoad(go);
// Debug.Log(_handle.AssetObject);
// };
// yield return _handle;
//}
IEnumerator LoadNetWorkHUD()
{
AssetHandle _handle = YooAssets.LoadAssetAsync<GameObject>("MyNetWorkHUD");