DebugOnDemo.cs 793 B

1234567891011121314151617181920212223242526272829303132
  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. }
  21. void Update()
  22. {
  23. if ((Input.GetKey(KeyCode.LeftControl) || Input.GetKey(KeyCode.RightControl)) && Input.GetKeyDown(KeyCode.Return))
  24. {
  25. Screen.fullScreen = !Screen.fullScreen;
  26. }
  27. }
  28. }