清理项目目录,引入 InputModule 做多平台输入适配
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
using SepCore.InputModule.Runtime;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace SepCore.InputModule.Editor
|
||||
{
|
||||
[CustomEditor(typeof(InputModuleComponent))]
|
||||
public sealed class InputModuleComponentEditor : UnityEditor.Editor
|
||||
{
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
base.OnInspectorGUI();
|
||||
|
||||
if (!Application.isPlaying)
|
||||
{
|
||||
EditorGUILayout.Space(8);
|
||||
EditorGUILayout.HelpBox("Runtime state is only available in Play Mode.", MessageType.Info);
|
||||
return;
|
||||
}
|
||||
|
||||
var component = (InputModuleComponent)target;
|
||||
|
||||
EditorGUILayout.Space(10);
|
||||
EditorGUILayout.LabelField("Runtime State", EditorStyles.boldLabel);
|
||||
|
||||
EditorGUI.BeginDisabledGroup(true);
|
||||
EditorGUILayout.Toggle("Initialized", component.IsInitialized);
|
||||
EditorGUILayout.EnumPopup("Device Kind", component.CurrentDeviceKind);
|
||||
EditorGUILayout.EnumPopup("Current Context", component.CurrentContext);
|
||||
EditorGUILayout.Toggle("Rebinding", component.IsRebinding);
|
||||
EditorGUI.EndDisabledGroup();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user