MainEntry.Ctrl.cs 592 B

1234567891011121314151617181920212223
  1. using UnityEngine;
  2. using static UnityEngine.InputSystem.InputAction;
  3. namespace GFMain
  4. {
  5. public partial class MainEntry : MonoBehaviour
  6. {
  7. private InputCommon inputs;
  8. protected void InitCtrl()
  9. {
  10. inputs = new InputCommon();
  11. inputs.Enable();
  12. inputs.Common.OpenDebug.performed += OnOpenDebug;
  13. }
  14. private void OnOpenDebug(CallbackContext context)
  15. {
  16. Debugger.ActiveWindow = !Debugger.ActiveWindow;
  17. if (Debugger.ActiveWindow)
  18. Debugger.ResetLayout();
  19. }
  20. }
  21. }