1
This commit is contained in:
40
Packages/Runtime/InputSystem/BITInputSystem.cs
Normal file
40
Packages/Runtime/InputSystem/BITInputSystem.cs
Normal file
@@ -0,0 +1,40 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
#if UNITY_EDITOR
|
||||
using UnityEngine.UIElements;
|
||||
using UnityEditor;
|
||||
using UnityEditor.UIElements;
|
||||
#endif
|
||||
namespace BITKit
|
||||
{
|
||||
public class BITInputSystem
|
||||
{
|
||||
[RuntimeInitializeOnLoadMethod]
|
||||
static void Reload()
|
||||
{
|
||||
AllowInput = new();
|
||||
}
|
||||
public static ValidHandle AllowInput = new();
|
||||
}
|
||||
#if UNITY_EDITOR
|
||||
public class BITInputSystemEditor : EditorWindow
|
||||
{
|
||||
RadioButton allowInput;
|
||||
[MenuItem("Tools/InputSystemEditor")]
|
||||
static void Entry()
|
||||
{
|
||||
GetWindow<BITInputSystemEditor>().Show();
|
||||
}
|
||||
void Start()
|
||||
{
|
||||
rootVisualElement.Add(allowInput = new());
|
||||
}
|
||||
void Update()
|
||||
{
|
||||
if (allowInput is not null)
|
||||
allowInput.value = BITInputSystem.AllowInput;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
Reference in New Issue
Block a user