DebugOnDemo.cs 835 B

123456789101112131415161718192021222324252627282930313233
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. public class DebugOnDemo : MonoBehaviour
  5. {
  6. void Start()
  7. {
  8. StartCoroutine(OpenDebug());
  9. }
  10. IEnumerator OpenDebug()
  11. {
  12. yield return null;
  13. ScreenLocate.Main.DebugOnZIMDemo = true;
  14. ScreenLocate.Main.SaveToggle.isOn = true;
  15. ScreenLocate.Main.FullScreenToggle.gameObject.SetActive(true);
  16. ScreenLocate.Main.FullScreenToggle.onValueChanged.AddListener((i) =>
  17. {
  18. Screen.fullScreen = i;
  19. });
  20. Application.targetFrameRate = 60;
  21. }
  22. void Update()
  23. {
  24. if ((Input.GetKey(KeyCode.LeftControl) || Input.GetKey(KeyCode.RightControl)) && Input.GetKeyDown(KeyCode.Return))
  25. {
  26. Screen.fullScreen = !Screen.fullScreen;
  27. }
  28. }
  29. }