This commit is contained in:
2025-11-13 17:40:28 +08:00
parent 962ab49609
commit 10156da245
5503 changed files with 805282 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
using Cysharp.Threading.Tasks;
using UnityEngine;
using YooAsset;
namespace Tuan.GameFramework
{
public class Boot : MonoBehaviour
{
public GameObject player;
public EPlayMode PlayMode = EPlayMode.EditorSimulateMode;
void Awake()
{
#if UNITY_EDITOR
//PlayerPrefs.DeleteAll();
#endif
Application.targetFrameRate = 60;
Application.runInBackground = true;
DontDestroyOnLoad(player);
}
async void Start()
{
bool updateSuccess = await PatchManager.Inst.StartOperation(PlayMode);
if (updateSuccess)
await EnterGame();
}
private async UniTask EnterGame()
{
Debug.Log("EnterGame");
var assetHandle = YooAssets.LoadAssetAsync<GameObject>("GameStart");
await assetHandle.ToUniTask();
GameObject.Instantiate(assetHandle.AssetObject);
}
}
}