208 lines
		
	
	
		
			6.5 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			208 lines
		
	
	
		
			6.5 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
| //------------------------------------------------------------------------------
 | |
| // <auto-generated>
 | |
| //     This code was auto-generated by com.unity.inputsystem:InputActionCodeGenerator
 | |
| //     version 1.5.0
 | |
| //     from Assets/_PROJECT/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"": """",
 | |
|                     ""initialStateCheck"": false
 | |
|                 }
 | |
|             ],
 | |
|             ""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 List<IOtherActions> m_OtherActionsCallbackInterfaces = new List<IOtherActions>();
 | |
|     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 AddCallbacks(IOtherActions instance)
 | |
|         {
 | |
|             if (instance == null || m_Wrapper.m_OtherActionsCallbackInterfaces.Contains(instance)) return;
 | |
|             m_Wrapper.m_OtherActionsCallbackInterfaces.Add(instance);
 | |
|             @Menu.started += instance.OnMenu;
 | |
|             @Menu.performed += instance.OnMenu;
 | |
|             @Menu.canceled += instance.OnMenu;
 | |
|         }
 | |
| 
 | |
|         private void UnregisterCallbacks(IOtherActions instance)
 | |
|         {
 | |
|             @Menu.started -= instance.OnMenu;
 | |
|             @Menu.performed -= instance.OnMenu;
 | |
|             @Menu.canceled -= instance.OnMenu;
 | |
|         }
 | |
| 
 | |
|         public void RemoveCallbacks(IOtherActions instance)
 | |
|         {
 | |
|             if (m_Wrapper.m_OtherActionsCallbackInterfaces.Remove(instance))
 | |
|                 UnregisterCallbacks(instance);
 | |
|         }
 | |
| 
 | |
|         public void SetCallbacks(IOtherActions instance)
 | |
|         {
 | |
|             foreach (var item in m_Wrapper.m_OtherActionsCallbackInterfaces)
 | |
|                 UnregisterCallbacks(item);
 | |
|             m_Wrapper.m_OtherActionsCallbackInterfaces.Clear();
 | |
|             AddCallbacks(instance);
 | |
|         }
 | |
|     }
 | |
|     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);
 | |
|     }
 | |
| }
 |