Files
TuanTuan-Engine/Assets/GameScripts/Main/GameStart.cs

21 lines
596 B
C#
Raw Normal View History

using Cysharp.Threading.Tasks;
2025-11-03 17:46:28 +08:00
using UnityEngine;
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
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");
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
}
}