40 lines
930 B
C#
40 lines
930 B
C#
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
|
|
} |