William Lebel a5fa34f8b0 Add custom control scheme for new input asset
Doesn't work yet with arcade inputs
2023-05-28 16:21:51 -04:00

30 lines
735 B
C#

using UnityEditor;
using UnityEngine;
using UnityEngine.InputSystem.Layouts;
using UnityEngine.InputSystem;
namespace ConjureOS.Input
{
#if UNITY_EDITOR
[InitializeOnLoad] // Call static class constructor in editor.
#endif
static public class ConjureInputSystem
{
static ConjureInputSystem()
{
Debug.Log("Mamamiiiiia");
#if UNITY_EDITOR
InitializeInEditor();
#endif
}
static void InitializeInEditor()
{
#if UNITY_EDITOR && ENABLE_INPUT_SYSTEM
InputSystem.RegisterLayout<ConjureArcadeController>(
matches: new InputDeviceMatcher()
.WithInterface("ConjureArcadeController"));
#endif
}
}
}