GameLauncher.cs 656 B

1234567891011121314151617181920212223242526272829
  1. using UnityEngine;
  2. using GFGGame;
  3. using FairyGUI;
  4. using YooAsset;
  5. using UnityEngine.SceneManagement;
  6. public class GameLauncher : MonoBehaviour
  7. {
  8. public static GameLauncher Instance;
  9. /// <summary>
  10. /// 资源系统运行模式
  11. /// </summary>
  12. public EPlayMode PlayMode = EPlayMode.EditorSimulateMode;
  13. private void Awake()
  14. {
  15. Instance = this;
  16. DontDestroyOnLoad(gameObject);
  17. SceneManager.LoadScene("VersionChecker");
  18. }
  19. // Start is called before the first frame update
  20. void Start()
  21. {
  22. Screen.sleepTimeout = SleepTimeout.NeverSleep;
  23. Application.runInBackground = true;
  24. }
  25. }