Files
TuanTuan-Engine/Assets/GameScripts/Main/GameStart.cs
2025-11-12 07:04:31 +08:00

27 lines
809 B
C#

using UnityEngine;
using Cysharp.Threading.Tasks;
using Tuan.GameFramework;
using Tuan.GameScripts.Preload;
namespace Tuan.GameScripts.Main
{
public class GameStart : MonoBehaviour
{
// Start is called once before the first execution of Update after the MonoBehaviour is created
async void Start()
{
Debug.Log("GameStart");
GamePreload.Inst.Test("call by GameStart");
// _ = FrameSplittingTest(1);
await UIManager.Inst.ShowUIAsync<SimpleR3Test>("test1", MainUICanvas.Inst.Medium);
}
async UniTask FrameSplittingTest(int delayFrame)
{
for (int i = 0; i < 100; i++)
{
Debug.Log(i);
await UniTask.DelayFrame(delayFrame);
}
}
}
}