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

29 lines
809 B
C#
Raw Normal View History

using Cysharp.Threading.Tasks;
2025-11-10 16:59:40 +08:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.NetworkInformation;
using System.Threading;
2025-11-03 17:46:28 +08:00
using UnityEngine;
2025-11-10 16:59:40 +08:00
using UnityEngine.Networking;
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");
2025-11-10 16:59:40 +08:00
_=FrameSplittingTest(1);
await UIManager.Inst.ShowUIAsync<SimpleR3Test>("test1", MainUICanvas.Inst.Medium);
}
2025-11-10 16:59:40 +08:00
async UniTask FrameSplittingTest(int delayFrame)
{
2025-11-10 16:59:40 +08:00
for (int i = 0; i < 100; i++)
{
Debug.Log(i);
await UniTask.DelayFrame(delayFrame);
}
2025-11-03 17:46:28 +08:00
}
2025-11-10 16:59:40 +08:00
}