This commit is contained in:
2025-11-12 07:04:31 +08:00
parent 33a4742904
commit f615d8ddb0
68 changed files with 1388 additions and 1478 deletions

View File

@@ -2,34 +2,37 @@ using Cysharp.Threading.Tasks;
using UnityEngine;
using YooAsset;
public class Boot : MonoBehaviour
namespace Tuan.GameFramework
{
public Camera MainCamera;
public EPlayMode PlayMode = EPlayMode.EditorSimulateMode;
void Awake()
public class Boot : MonoBehaviour
{
#if UNITY_EDITOR
//PlayerPrefs.DeleteAll();
#endif
Application.targetFrameRate = 60;
Application.runInBackground = true;
DontDestroyOnLoad(MainCamera);
}
async void Start()
{
bool updateSuccess = await PatchManager.Inst.StartOperation(PlayMode);
if (updateSuccess)
await EnterGame();
}
private async UniTask EnterGame()
{
Debug.Log("EnterGame");
var assetHandle = YooAssets.TryGetPackage("Main").LoadSceneAsync("Test");
await assetHandle.ToUniTask();
if (assetHandle.Status == EOperationStatus.Succeed)
public Camera MainCamera;
public EPlayMode PlayMode = EPlayMode.EditorSimulateMode;
void Awake()
{
assetHandle.ActivateScene();
PatchEvent.ClosePatchWindow();
#if UNITY_EDITOR
//PlayerPrefs.DeleteAll();
#endif
Application.targetFrameRate = 60;
Application.runInBackground = true;
DontDestroyOnLoad(MainCamera);
}
async void Start()
{
bool updateSuccess = await PatchManager.Inst.StartOperation(PlayMode);
if (updateSuccess)
await EnterGame();
}
private async UniTask EnterGame()
{
Debug.Log("EnterGame");
var assetHandle = YooAssets.TryGetPackage("Main").LoadSceneAsync("Test");
await assetHandle.ToUniTask();
if (assetHandle.Status == EOperationStatus.Succeed)
{
assetHandle.ActivateScene();
PatchEvent.ClosePatchWindow();
}
}
}
}
}