add package files
This commit is contained in:
@@ -0,0 +1,152 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was auto-generated by com.unity.inputsystem:InputActionCodeGenerator
|
||||
// version 1.4.1
|
||||
// from Assets/Samples/VIVE OpenXR Plugin - Windows/1.0.12/HandTracking Example/Scripts/InputMaster.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 @InputMaster : IInputActionCollection2, IDisposable
|
||||
{
|
||||
public InputActionAsset asset { get; }
|
||||
public @InputMaster()
|
||||
{
|
||||
asset = InputActionAsset.FromJson(@"{
|
||||
""name"": ""InputMaster"",
|
||||
""maps"": [
|
||||
{
|
||||
""name"": ""Keyboard"",
|
||||
""id"": ""94ee31f8-c9ac-4138-b5b9-ad5ecec1870d"",
|
||||
""actions"": [
|
||||
{
|
||||
""name"": ""SpacePress"",
|
||||
""type"": ""Button"",
|
||||
""id"": ""2a246a3d-969f-4d95-8e12-9e0000e5b19c"",
|
||||
""expectedControlType"": ""Button"",
|
||||
""processors"": """",
|
||||
""interactions"": """",
|
||||
""initialStateCheck"": false
|
||||
}
|
||||
],
|
||||
""bindings"": [
|
||||
{
|
||||
""name"": """",
|
||||
""id"": ""d6ea233e-905c-4913-a644-8a84098fea9f"",
|
||||
""path"": ""<Keyboard>/space"",
|
||||
""interactions"": """",
|
||||
""processors"": """",
|
||||
""groups"": """",
|
||||
""action"": ""SpacePress"",
|
||||
""isComposite"": false,
|
||||
""isPartOfComposite"": false
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
""controlSchemes"": []
|
||||
}");
|
||||
// Keyboard
|
||||
m_Keyboard = asset.FindActionMap("Keyboard", throwIfNotFound: true);
|
||||
m_Keyboard_SpacePress = m_Keyboard.FindAction("SpacePress", 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);
|
||||
}
|
||||
|
||||
// Keyboard
|
||||
private readonly InputActionMap m_Keyboard;
|
||||
private IKeyboardActions m_KeyboardActionsCallbackInterface;
|
||||
private readonly InputAction m_Keyboard_SpacePress;
|
||||
public struct KeyboardActions
|
||||
{
|
||||
private @InputMaster m_Wrapper;
|
||||
public KeyboardActions(@InputMaster wrapper) { m_Wrapper = wrapper; }
|
||||
public InputAction @SpacePress => m_Wrapper.m_Keyboard_SpacePress;
|
||||
public InputActionMap Get() { return m_Wrapper.m_Keyboard; }
|
||||
public void Enable() { Get().Enable(); }
|
||||
public void Disable() { Get().Disable(); }
|
||||
public bool enabled => Get().enabled;
|
||||
public static implicit operator InputActionMap(KeyboardActions set) { return set.Get(); }
|
||||
public void SetCallbacks(IKeyboardActions instance)
|
||||
{
|
||||
if (m_Wrapper.m_KeyboardActionsCallbackInterface != null)
|
||||
{
|
||||
@SpacePress.started -= m_Wrapper.m_KeyboardActionsCallbackInterface.OnSpacePress;
|
||||
@SpacePress.performed -= m_Wrapper.m_KeyboardActionsCallbackInterface.OnSpacePress;
|
||||
@SpacePress.canceled -= m_Wrapper.m_KeyboardActionsCallbackInterface.OnSpacePress;
|
||||
}
|
||||
m_Wrapper.m_KeyboardActionsCallbackInterface = instance;
|
||||
if (instance != null)
|
||||
{
|
||||
@SpacePress.started += instance.OnSpacePress;
|
||||
@SpacePress.performed += instance.OnSpacePress;
|
||||
@SpacePress.canceled += instance.OnSpacePress;
|
||||
}
|
||||
}
|
||||
}
|
||||
public KeyboardActions @Keyboard => new KeyboardActions(this);
|
||||
public interface IKeyboardActions
|
||||
{
|
||||
void OnSpacePress(InputAction.CallbackContext context);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user