2025-11-05 05:16:06 +08:00
|
|
|
using Cysharp.Threading.Tasks;
|
2025-11-03 17:46:28 +08:00
|
|
|
using UnityEngine;
|
2025-11-05 05:16:06 +08:00
|
|
|
using YooAsset;
|
2025-11-03 17:46:28 +08:00
|
|
|
|
|
|
|
|
public class GameStart : MonoBehaviour
|
|
|
|
|
{
|
|
|
|
|
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
2025-11-05 05:16:06 +08:00
|
|
|
async void Start()
|
2025-11-03 17:46:28 +08:00
|
|
|
{
|
2025-11-04 16:19:53 +08:00
|
|
|
Debug.Log("GameStart");
|
|
|
|
|
GamePreload.Inst.Test("call by GameStart");
|
2025-11-05 05:16:06 +08:00
|
|
|
await LoadSimpleR3Test();
|
|
|
|
|
}
|
|
|
|
|
async UniTask LoadSimpleR3Test()
|
|
|
|
|
{
|
|
|
|
|
AssetHandle handle = YooAssets.LoadAssetAsync<GameObject>("SimpleR3Test");
|
|
|
|
|
await handle;
|
|
|
|
|
GameObject.Instantiate(handle.AssetObject, MainUICanvas.Inst.Medium);
|
2025-11-03 17:46:28 +08:00
|
|
|
}
|
|
|
|
|
}
|