192 lines
6.0 KiB
C#
192 lines
6.0 KiB
C#
//------------------------------------------------------------------------------
|
|
// <auto-generated>
|
|
// This code was auto-generated by com.unity.inputsystem:InputActionCodeGenerator
|
|
// version 1.1.0
|
|
// from Assets/VRControls.inputactions
|
|
//
|
|
// Changes to this file may cause incorrect behavior and will be lost if
|
|
// the code is regenerated.
|
|
// </auto-generated>
|
|
//------------------------------------------------------------------------------
|
|
|
|
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine.InputSystem;
|
|
using UnityEngine.InputSystem.Utilities;
|
|
|
|
public partial class @VRControls : IInputActionCollection2, IDisposable
|
|
{
|
|
public InputActionAsset asset { get; }
|
|
public @VRControls()
|
|
{
|
|
asset = InputActionAsset.FromJson(@"{
|
|
""name"": ""VRControls"",
|
|
""maps"": [
|
|
{
|
|
""name"": ""Other"",
|
|
""id"": ""12a55770-e280-4f2b-957d-540a6021dd7f"",
|
|
""actions"": [
|
|
{
|
|
""name"": ""Menu"",
|
|
""type"": ""Button"",
|
|
""id"": ""400eaeca-dfbe-439a-af65-9233bf3c309f"",
|
|
""expectedControlType"": ""Button"",
|
|
""processors"": """",
|
|
""interactions"": """"
|
|
}
|
|
],
|
|
""bindings"": [
|
|
{
|
|
""name"": """",
|
|
""id"": ""d47557b8-b626-42da-ba84-36ab8c2d01fc"",
|
|
""path"": ""<XRSimulatedController>{LeftHand}/primaryButton"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": ""VR"",
|
|
""action"": ""Menu"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": false
|
|
},
|
|
{
|
|
""name"": """",
|
|
""id"": ""0de45a67-da15-4ade-9970-7574ca267fd5"",
|
|
""path"": ""<Keyboard>/escape"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": ""KBM"",
|
|
""action"": ""Menu"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": false
|
|
}
|
|
]
|
|
}
|
|
],
|
|
""controlSchemes"": [
|
|
{
|
|
""name"": ""VR"",
|
|
""bindingGroup"": ""VR"",
|
|
""devices"": []
|
|
},
|
|
{
|
|
""name"": ""KBM"",
|
|
""bindingGroup"": ""KBM"",
|
|
""devices"": []
|
|
}
|
|
]
|
|
}");
|
|
// Other
|
|
m_Other = asset.FindActionMap("Other", throwIfNotFound: true);
|
|
m_Other_Menu = m_Other.FindAction("Menu", throwIfNotFound: true);
|
|
}
|
|
|
|
public void Dispose()
|
|
{
|
|
UnityEngine.Object.Destroy(asset);
|
|
}
|
|
|
|
public InputBinding? bindingMask
|
|
{
|
|
get => asset.bindingMask;
|
|
set => asset.bindingMask = value;
|
|
}
|
|
|
|
public ReadOnlyArray<InputDevice>? devices
|
|
{
|
|
get => asset.devices;
|
|
set => asset.devices = value;
|
|
}
|
|
|
|
public ReadOnlyArray<InputControlScheme> controlSchemes => asset.controlSchemes;
|
|
|
|
public bool Contains(InputAction action)
|
|
{
|
|
return asset.Contains(action);
|
|
}
|
|
|
|
public IEnumerator<InputAction> GetEnumerator()
|
|
{
|
|
return asset.GetEnumerator();
|
|
}
|
|
|
|
IEnumerator IEnumerable.GetEnumerator()
|
|
{
|
|
return GetEnumerator();
|
|
}
|
|
|
|
public void Enable()
|
|
{
|
|
asset.Enable();
|
|
}
|
|
|
|
public void Disable()
|
|
{
|
|
asset.Disable();
|
|
}
|
|
public IEnumerable<InputBinding> bindings => asset.bindings;
|
|
|
|
public InputAction FindAction(string actionNameOrId, bool throwIfNotFound = false)
|
|
{
|
|
return asset.FindAction(actionNameOrId, throwIfNotFound);
|
|
}
|
|
public int FindBinding(InputBinding bindingMask, out InputAction action)
|
|
{
|
|
return asset.FindBinding(bindingMask, out action);
|
|
}
|
|
|
|
// Other
|
|
private readonly InputActionMap m_Other;
|
|
private IOtherActions m_OtherActionsCallbackInterface;
|
|
private readonly InputAction m_Other_Menu;
|
|
public struct OtherActions
|
|
{
|
|
private @VRControls m_Wrapper;
|
|
public OtherActions(@VRControls wrapper) { m_Wrapper = wrapper; }
|
|
public InputAction @Menu => m_Wrapper.m_Other_Menu;
|
|
public InputActionMap Get() { return m_Wrapper.m_Other; }
|
|
public void Enable() { Get().Enable(); }
|
|
public void Disable() { Get().Disable(); }
|
|
public bool enabled => Get().enabled;
|
|
public static implicit operator InputActionMap(OtherActions set) { return set.Get(); }
|
|
public void SetCallbacks(IOtherActions instance)
|
|
{
|
|
if (m_Wrapper.m_OtherActionsCallbackInterface != null)
|
|
{
|
|
@Menu.started -= m_Wrapper.m_OtherActionsCallbackInterface.OnMenu;
|
|
@Menu.performed -= m_Wrapper.m_OtherActionsCallbackInterface.OnMenu;
|
|
@Menu.canceled -= m_Wrapper.m_OtherActionsCallbackInterface.OnMenu;
|
|
}
|
|
m_Wrapper.m_OtherActionsCallbackInterface = instance;
|
|
if (instance != null)
|
|
{
|
|
@Menu.started += instance.OnMenu;
|
|
@Menu.performed += instance.OnMenu;
|
|
@Menu.canceled += instance.OnMenu;
|
|
}
|
|
}
|
|
}
|
|
public OtherActions @Other => new OtherActions(this);
|
|
private int m_VRSchemeIndex = -1;
|
|
public InputControlScheme VRScheme
|
|
{
|
|
get
|
|
{
|
|
if (m_VRSchemeIndex == -1) m_VRSchemeIndex = asset.FindControlSchemeIndex("VR");
|
|
return asset.controlSchemes[m_VRSchemeIndex];
|
|
}
|
|
}
|
|
private int m_KBMSchemeIndex = -1;
|
|
public InputControlScheme KBMScheme
|
|
{
|
|
get
|
|
{
|
|
if (m_KBMSchemeIndex == -1) m_KBMSchemeIndex = asset.FindControlSchemeIndex("KBM");
|
|
return asset.controlSchemes[m_KBMSchemeIndex];
|
|
}
|
|
}
|
|
public interface IOtherActions
|
|
{
|
|
void OnMenu(InputAction.CallbackContext context);
|
|
}
|
|
}
|