init
This commit is contained in:
30
Assets/GameFramework/Runtime/Boot.cs
Normal file
30
Assets/GameFramework/Runtime/Boot.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
using YooAsset;
|
||||
|
||||
public class Boot : MonoBehaviour
|
||||
{
|
||||
public GameObject MainUICanvas;
|
||||
public Camera UICamera;
|
||||
public EPlayMode PlayMode = EPlayMode.EditorSimulateMode;
|
||||
void Awake()
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
PlayerPrefs.DeleteAll();
|
||||
#endif
|
||||
Application.targetFrameRate = 60;
|
||||
Application.runInBackground = true;
|
||||
}
|
||||
async void Start()
|
||||
{
|
||||
GameManager.Inst.UICamera = UICamera;
|
||||
GameManager.Inst.MainUICanvas = MainUICanvas;
|
||||
bool updateSuccess = await PatchManager.Inst.StartOperation(PlayMode);
|
||||
if (updateSuccess)
|
||||
EnterGame();
|
||||
}
|
||||
private void EnterGame()
|
||||
{
|
||||
Debug.Log("EnterGame");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user