//------------------------------------------------------------------------------ // // This code was auto-generated by com.unity.inputsystem:InputActionCodeGenerator // version 1.16.0 // from Packages/com.nwh.common/Runtime/Input/InputSystem/SceneInputActions.inputactions // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ using System; using System.Collections; using System.Collections.Generic; using UnityEngine.InputSystem; using UnityEngine.InputSystem.Utilities; namespace NWH.Common.Input { /// /// Provides programmatic access to , , and instances defined in asset "Packages/com.nwh.common/Runtime/Input/InputSystem/SceneInputActions.inputactions". /// /// /// This class is source generated and any manual edits will be discarded if the associated asset is reimported or modified. /// /// /// /// using namespace UnityEngine; /// using UnityEngine.InputSystem; /// /// // Example of using an InputActionMap named "Player" from a UnityEngine.MonoBehaviour implementing callback interface. /// public class Example : MonoBehaviour, MyActions.IPlayerActions /// { /// private MyActions_Actions m_Actions; // Source code representation of asset. /// private MyActions_Actions.PlayerActions m_Player; // Source code representation of action map. /// /// void Awake() /// { /// m_Actions = new MyActions_Actions(); // Create asset object. /// m_Player = m_Actions.Player; // Extract action map object. /// m_Player.AddCallbacks(this); // Register callback interface IPlayerActions. /// } /// /// void OnDestroy() /// { /// m_Actions.Dispose(); // Destroy asset object. /// } /// /// void OnEnable() /// { /// m_Player.Enable(); // Enable all actions within map. /// } /// /// void OnDisable() /// { /// m_Player.Disable(); // Disable all actions within map. /// } /// /// #region Interface implementation of MyActions.IPlayerActions /// /// // Invoked when "Move" action is either started, performed or canceled. /// public void OnMove(InputAction.CallbackContext context) /// { /// Debug.Log($"OnMove: {context.ReadValue<Vector2>()}"); /// } /// /// // Invoked when "Attack" action is either started, performed or canceled. /// public void OnAttack(InputAction.CallbackContext context) /// { /// Debug.Log($"OnAttack: {context.ReadValue<float>()}"); /// } /// /// #endregion /// } /// /// public partial class @SceneInputActions: IInputActionCollection2, IDisposable { /// /// Provides access to the underlying asset instance. /// public InputActionAsset asset { get; } /// /// Constructs a new instance. /// public @SceneInputActions() { asset = InputActionAsset.FromJson(@"{ ""version"": 1, ""name"": ""SceneInputActions"", ""maps"": [ { ""name"": ""CameraControls"", ""id"": ""f9b2c2eb-8265-4430-a0ac-4cf8495a2002"", ""actions"": [ { ""name"": ""ChangeCamera"", ""type"": ""Button"", ""id"": ""71ec0b0c-0911-4b04-a2cc-424b01ebe88e"", ""expectedControlType"": """", ""processors"": """", ""interactions"": """", ""initialStateCheck"": false }, { ""name"": ""CameraRotation"", ""type"": ""Value"", ""id"": ""8f870466-b390-4fae-a439-ccb19a4537c2"", ""expectedControlType"": ""Vector2"", ""processors"": """", ""interactions"": """", ""initialStateCheck"": true }, { ""name"": ""CameraPanning"", ""type"": ""Value"", ""id"": ""08d3e09d-7ab8-4f42-976a-530f947fe4c8"", ""expectedControlType"": ""Vector2"", ""processors"": """", ""interactions"": """", ""initialStateCheck"": true }, { ""name"": ""CameraRotationModifier"", ""type"": ""Button"", ""id"": ""124e3374-e4a2-4e74-b0cf-c8959a11ac39"", ""expectedControlType"": ""Button"", ""processors"": """", ""interactions"": """", ""initialStateCheck"": false }, { ""name"": ""CameraPanningModifier"", ""type"": ""Button"", ""id"": ""ce8eda53-b48a-45c4-83c7-3f0b44ad36f7"", ""expectedControlType"": ""Button"", ""processors"": """", ""interactions"": """", ""initialStateCheck"": false }, { ""name"": ""CameraZoom"", ""type"": ""Value"", ""id"": ""018cdf61-e865-49da-9064-33dc2ae63580"", ""expectedControlType"": ""Analog"", ""processors"": """", ""interactions"": """", ""initialStateCheck"": true } ], ""bindings"": [ { ""name"": """", ""id"": ""24fa1b4b-fa43-49bc-ba60-3aedbe8d6c1f"", ""path"": ""/c"", ""interactions"": """", ""processors"": """", ""groups"": """", ""action"": ""ChangeCamera"", ""isComposite"": false, ""isPartOfComposite"": false }, { ""name"": """", ""id"": ""530b85ac-4cae-49f9-804b-3a0dbaeb4a7b"", ""path"": ""/start"", ""interactions"": """", ""processors"": """", ""groups"": """", ""action"": ""ChangeCamera"", ""isComposite"": false, ""isPartOfComposite"": false }, { ""name"": """", ""id"": ""6d0ae04c-f252-4dd6-824a-27baa3d26db7"", ""path"": ""/delta"", ""interactions"": """", ""processors"": ""ScaleVector2(x=0.2,y=0.2)"", ""groups"": """", ""action"": ""CameraRotation"", ""isComposite"": false, ""isPartOfComposite"": false }, { ""name"": ""Gamepad"", ""id"": ""2cb8a8bc-5e28-4393-bc30-fe55c9d9ffc7"", ""path"": ""2DVector(mode=2)"", ""interactions"": """", ""processors"": ""InvertVector2"", ""groups"": """", ""action"": ""CameraRotation"", ""isComposite"": true, ""isPartOfComposite"": false }, { ""name"": ""up"", ""id"": ""a144950a-0314-41fb-b0a3-0fa7943d12f1"", ""path"": ""/rightStick/up"", ""interactions"": """", ""processors"": """", ""groups"": """", ""action"": ""CameraRotation"", ""isComposite"": false, ""isPartOfComposite"": true }, { ""name"": ""down"", ""id"": ""a039c90a-129d-43ea-b2ec-bffde20e618a"", ""path"": ""/rightStick/down"", ""interactions"": """", ""processors"": """", ""groups"": """", ""action"": ""CameraRotation"", ""isComposite"": false, ""isPartOfComposite"": true }, { ""name"": ""left"", ""id"": ""e78f01bc-414a-4ba8-83e0-02deb5f631c6"", ""path"": ""/rightStick/left"", ""interactions"": """", ""processors"": """", ""groups"": """", ""action"": ""CameraRotation"", ""isComposite"": false, ""isPartOfComposite"": true }, { ""name"": ""right"", ""id"": ""3cd6cbde-a6f8-4da4-8cc2-9c8c1edc133e"", ""path"": ""/rightStick/right"", ""interactions"": """", ""processors"": """", ""groups"": """", ""action"": ""CameraRotation"", ""isComposite"": false, ""isPartOfComposite"": true }, { ""name"": """", ""id"": ""9e78c527-4641-4f9b-98e4-fb7f87edf64d"", ""path"": ""/delta"", ""interactions"": """", ""processors"": ""ScaleVector2(x=0.2,y=0.2)"", ""groups"": """", ""action"": ""CameraPanning"", ""isComposite"": false, ""isPartOfComposite"": false }, { ""name"": """", ""id"": ""3968d956-a143-403b-87e5-0b91afb999eb"", ""path"": ""/leftButton"", ""interactions"": """", ""processors"": """", ""groups"": """", ""action"": ""CameraRotationModifier"", ""isComposite"": false, ""isPartOfComposite"": false }, { ""name"": """", ""id"": ""8f3a4e0e-6782-4b53-8c26-e06e68d8e1ee"", ""path"": ""/rightStickPress"", ""interactions"": """", ""processors"": """", ""groups"": """", ""action"": ""CameraRotationModifier"", ""isComposite"": false, ""isPartOfComposite"": false }, { ""name"": """", ""id"": ""8a15b75c-fd20-4def-8b73-5d8273fe3364"", ""path"": ""/rightButton"", ""interactions"": """", ""processors"": """", ""groups"": """", ""action"": ""CameraPanningModifier"", ""isComposite"": false, ""isPartOfComposite"": false }, { ""name"": """", ""id"": ""dee7ac85-80d0-4018-bbe7-114eecc930ae"", ""path"": ""/leftStickPress"", ""interactions"": """", ""processors"": """", ""groups"": """", ""action"": ""CameraPanningModifier"", ""isComposite"": false, ""isPartOfComposite"": false }, { ""name"": ""Gamepad"", ""id"": ""93e86e22-3ea3-4e7f-b800-9fc9575e9190"", ""path"": ""2DVector"", ""interactions"": """", ""processors"": ""InvertVector2"", ""groups"": """", ""action"": ""CameraPanning"", ""isComposite"": true, ""isPartOfComposite"": false }, { ""name"": ""up"", ""id"": ""9e35bef4-dec2-47ce-a040-063273bd2183"", ""path"": ""/rightStick/up"", ""interactions"": """", ""processors"": """", ""groups"": """", ""action"": ""CameraPanning"", ""isComposite"": false, ""isPartOfComposite"": true }, { ""name"": ""down"", ""id"": ""ca312712-12f3-438c-a542-d998b4fca387"", ""path"": ""/rightStick/down"", ""interactions"": """", ""processors"": """", ""groups"": """", ""action"": ""CameraPanning"", ""isComposite"": false, ""isPartOfComposite"": true }, { ""name"": ""left"", ""id"": ""16a19e86-eb75-40ef-a937-cc69f5c57971"", ""path"": ""/rightStick/left"", ""interactions"": """", ""processors"": """", ""groups"": """", ""action"": ""CameraPanning"", ""isComposite"": false, ""isPartOfComposite"": true }, { ""name"": ""right"", ""id"": ""338131ba-47f8-4fc8-b137-39be986200ed"", ""path"": ""/rightStick/right"", ""interactions"": """", ""processors"": """", ""groups"": """", ""action"": ""CameraPanning"", ""isComposite"": false, ""isPartOfComposite"": true }, { ""name"": """", ""id"": ""2553a5ac-0892-4d77-a408-8b5fced329a8"", ""path"": ""/scroll/y"", ""interactions"": """", ""processors"": ""Scale(factor=0.1)"", ""groups"": """", ""action"": ""CameraZoom"", ""isComposite"": false, ""isPartOfComposite"": false }, { ""name"": ""Gamepad"", ""id"": ""aeaabcc3-6825-4a24-b1b3-13b3a70fff59"", ""path"": ""1DAxis(whichSideWins=1)"", ""interactions"": """", ""processors"": """", ""groups"": """", ""action"": ""CameraZoom"", ""isComposite"": true, ""isPartOfComposite"": false }, { ""name"": ""negative"", ""id"": ""d55890ea-00d2-483e-9b0a-e2ba85f4b2dd"", ""path"": ""/dpad/down"", ""interactions"": """", ""processors"": """", ""groups"": """", ""action"": ""CameraZoom"", ""isComposite"": false, ""isPartOfComposite"": true }, { ""name"": ""positive"", ""id"": ""3ce859ed-6297-4bab-b40b-d6436bacd5ab"", ""path"": ""/dpad/up"", ""interactions"": """", ""processors"": """", ""groups"": """", ""action"": ""CameraZoom"", ""isComposite"": false, ""isPartOfComposite"": true } ] }, { ""name"": ""SceneControls"", ""id"": ""abb87e97-bffa-439c-a42d-7b1a9497c4cc"", ""actions"": [ { ""name"": ""ChangeVehicle"", ""type"": ""Button"", ""id"": ""a6ddd2a4-de73-4949-8b79-fef6d4b4bc3f"", ""expectedControlType"": """", ""processors"": """", ""interactions"": """", ""initialStateCheck"": false }, { ""name"": ""FPSMovement"", ""type"": ""Value"", ""id"": ""347a1c7d-d6ca-4838-9d67-ca3bece4074f"", ""expectedControlType"": ""Vector2"", ""processors"": """", ""interactions"": """", ""initialStateCheck"": true }, { ""name"": ""ToggleGUI"", ""type"": ""Button"", ""id"": ""420fdb48-6cea-444b-8cd6-256097129d3b"", ""expectedControlType"": ""Button"", ""processors"": """", ""interactions"": """", ""initialStateCheck"": false }, { ""name"": ""DragObjectModifier"", ""type"": ""Button"", ""id"": ""1fd9ef37-8fcf-43c4-9b96-ed432f843af4"", ""expectedControlType"": ""Button"", ""processors"": """", ""interactions"": """", ""initialStateCheck"": false }, { ""name"": ""ShowCursor"", ""type"": ""Button"", ""id"": ""4566d436-6301-4d31-bd9b-984b19b6cc9b"", ""expectedControlType"": ""Button"", ""processors"": """", ""interactions"": """", ""initialStateCheck"": false } ], ""bindings"": [ { ""name"": """", ""id"": ""02e5b759-a74a-41e1-af72-80c6990f0d95"", ""path"": ""/v"", ""interactions"": """", ""processors"": """", ""groups"": """", ""action"": ""ChangeVehicle"", ""isComposite"": false, ""isPartOfComposite"": false }, { ""name"": """", ""id"": ""01597fdb-29e0-4e77-a920-ba59240fe6d6"", ""path"": ""/select"", ""interactions"": """", ""processors"": """", ""groups"": """", ""action"": ""ChangeVehicle"", ""isComposite"": false, ""isPartOfComposite"": false }, { ""name"": ""Keyboard"", ""id"": ""59431748-63e9-4210-8dd9-590e23bcdf0c"", ""path"": ""2DVector(mode=1)"", ""interactions"": """", ""processors"": """", ""groups"": """", ""action"": ""FPSMovement"", ""isComposite"": true, ""isPartOfComposite"": false }, { ""name"": ""up"", ""id"": ""e0b8875d-06d4-467d-b8f0-61da2e804895"", ""path"": ""/w"", ""interactions"": """", ""processors"": """", ""groups"": """", ""action"": ""FPSMovement"", ""isComposite"": false, ""isPartOfComposite"": true }, { ""name"": ""down"", ""id"": ""87e4ea7c-c07f-491e-8dc6-36f79dbf9805"", ""path"": ""/s"", ""interactions"": """", ""processors"": """", ""groups"": """", ""action"": ""FPSMovement"", ""isComposite"": false, ""isPartOfComposite"": true }, { ""name"": ""left"", ""id"": ""9bba77a1-921c-493d-b881-6f14f1eb377b"", ""path"": ""/a"", ""interactions"": """", ""processors"": """", ""groups"": """", ""action"": ""FPSMovement"", ""isComposite"": false, ""isPartOfComposite"": true }, { ""name"": ""right"", ""id"": ""cfa4cf6d-3fe9-4930-847f-b59a8277a8fc"", ""path"": ""/d"", ""interactions"": """", ""processors"": """", ""groups"": """", ""action"": ""FPSMovement"", ""isComposite"": false, ""isPartOfComposite"": true }, { ""name"": ""Gamepad"", ""id"": ""208efade-fdb9-49b9-a679-eb44b6ed6ac2"", ""path"": ""2DVector(mode=2)"", ""interactions"": """", ""processors"": """", ""groups"": """", ""action"": ""FPSMovement"", ""isComposite"": true, ""isPartOfComposite"": false }, { ""name"": ""up"", ""id"": ""8087e701-d9e1-454b-8b70-50813a31516b"", ""path"": ""/leftStick/up"", ""interactions"": """", ""processors"": """", ""groups"": """", ""action"": ""FPSMovement"", ""isComposite"": false, ""isPartOfComposite"": true }, { ""name"": ""down"", ""id"": ""0b594ea6-b48c-4805-9cea-77058ade6d6a"", ""path"": ""/leftStick/down"", ""interactions"": """", ""processors"": """", ""groups"": """", ""action"": ""FPSMovement"", ""isComposite"": false, ""isPartOfComposite"": true }, { ""name"": ""left"", ""id"": ""e7548400-0520-4980-aded-b6d0ac753e4a"", ""path"": ""/leftStick/left"", ""interactions"": """", ""processors"": """", ""groups"": """", ""action"": ""FPSMovement"", ""isComposite"": false, ""isPartOfComposite"": true }, { ""name"": ""right"", ""id"": ""b46be990-1176-4948-8642-dddc1bf5ee6c"", ""path"": ""/leftStick/right"", ""interactions"": """", ""processors"": """", ""groups"": """", ""action"": ""FPSMovement"", ""isComposite"": false, ""isPartOfComposite"": true }, { ""name"": """", ""id"": ""9f9f8d86-cd0b-4953-8490-e72ab4b7d8f0"", ""path"": ""/tab"", ""interactions"": """", ""processors"": """", ""groups"": """", ""action"": ""ToggleGUI"", ""isComposite"": false, ""isPartOfComposite"": false }, { ""name"": """", ""id"": ""2d06a9ed-570c-45df-ae1b-aec7652096fd"", ""path"": ""/middleButton"", ""interactions"": """", ""processors"": """", ""groups"": """", ""action"": ""DragObjectModifier"", ""isComposite"": false, ""isPartOfComposite"": false }, { ""name"": """", ""id"": ""2685a4d7-beae-479c-a63b-f7cd494f9c8a"", ""path"": ""/leftCtrl"", ""interactions"": """", ""processors"": """", ""groups"": """", ""action"": ""ShowCursor"", ""isComposite"": false, ""isPartOfComposite"": false } ] } ], ""controlSchemes"": [] }"); // CameraControls m_CameraControls = asset.FindActionMap("CameraControls", throwIfNotFound: true); m_CameraControls_ChangeCamera = m_CameraControls.FindAction("ChangeCamera", throwIfNotFound: true); m_CameraControls_CameraRotation = m_CameraControls.FindAction("CameraRotation", throwIfNotFound: true); m_CameraControls_CameraPanning = m_CameraControls.FindAction("CameraPanning", throwIfNotFound: true); m_CameraControls_CameraRotationModifier = m_CameraControls.FindAction("CameraRotationModifier", throwIfNotFound: true); m_CameraControls_CameraPanningModifier = m_CameraControls.FindAction("CameraPanningModifier", throwIfNotFound: true); m_CameraControls_CameraZoom = m_CameraControls.FindAction("CameraZoom", throwIfNotFound: true); // SceneControls m_SceneControls = asset.FindActionMap("SceneControls", throwIfNotFound: true); m_SceneControls_ChangeVehicle = m_SceneControls.FindAction("ChangeVehicle", throwIfNotFound: true); m_SceneControls_FPSMovement = m_SceneControls.FindAction("FPSMovement", throwIfNotFound: true); m_SceneControls_ToggleGUI = m_SceneControls.FindAction("ToggleGUI", throwIfNotFound: true); m_SceneControls_DragObjectModifier = m_SceneControls.FindAction("DragObjectModifier", throwIfNotFound: true); m_SceneControls_ShowCursor = m_SceneControls.FindAction("ShowCursor", throwIfNotFound: true); } ~@SceneInputActions() { UnityEngine.Debug.Assert(!m_CameraControls.enabled, "This will cause a leak and performance issues, SceneInputActions.CameraControls.Disable() has not been called."); UnityEngine.Debug.Assert(!m_SceneControls.enabled, "This will cause a leak and performance issues, SceneInputActions.SceneControls.Disable() has not been called."); } /// /// Destroys this asset and all associated instances. /// public void Dispose() { UnityEngine.Object.Destroy(asset); } /// public InputBinding? bindingMask { get => asset.bindingMask; set => asset.bindingMask = value; } /// public ReadOnlyArray? devices { get => asset.devices; set => asset.devices = value; } /// public ReadOnlyArray controlSchemes => asset.controlSchemes; /// public bool Contains(InputAction action) { return asset.Contains(action); } /// public IEnumerator GetEnumerator() { return asset.GetEnumerator(); } /// IEnumerator IEnumerable.GetEnumerator() { return GetEnumerator(); } /// public void Enable() { asset.Enable(); } /// public void Disable() { asset.Disable(); } /// public IEnumerable 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); } // CameraControls private readonly InputActionMap m_CameraControls; private List m_CameraControlsActionsCallbackInterfaces = new List(); private readonly InputAction m_CameraControls_ChangeCamera; private readonly InputAction m_CameraControls_CameraRotation; private readonly InputAction m_CameraControls_CameraPanning; private readonly InputAction m_CameraControls_CameraRotationModifier; private readonly InputAction m_CameraControls_CameraPanningModifier; private readonly InputAction m_CameraControls_CameraZoom; /// /// Provides access to input actions defined in input action map "CameraControls". /// public struct CameraControlsActions { private @SceneInputActions m_Wrapper; /// /// Construct a new instance of the input action map wrapper class. /// public CameraControlsActions(@SceneInputActions wrapper) { m_Wrapper = wrapper; } /// /// Provides access to the underlying input action "CameraControls/ChangeCamera". /// public InputAction @ChangeCamera => m_Wrapper.m_CameraControls_ChangeCamera; /// /// Provides access to the underlying input action "CameraControls/CameraRotation". /// public InputAction @CameraRotation => m_Wrapper.m_CameraControls_CameraRotation; /// /// Provides access to the underlying input action "CameraControls/CameraPanning". /// public InputAction @CameraPanning => m_Wrapper.m_CameraControls_CameraPanning; /// /// Provides access to the underlying input action "CameraControls/CameraRotationModifier". /// public InputAction @CameraRotationModifier => m_Wrapper.m_CameraControls_CameraRotationModifier; /// /// Provides access to the underlying input action "CameraControls/CameraPanningModifier". /// public InputAction @CameraPanningModifier => m_Wrapper.m_CameraControls_CameraPanningModifier; /// /// Provides access to the underlying input action "CameraControls/CameraZoom". /// public InputAction @CameraZoom => m_Wrapper.m_CameraControls_CameraZoom; /// /// Provides access to the underlying input action map instance. /// public InputActionMap Get() { return m_Wrapper.m_CameraControls; } /// public void Enable() { Get().Enable(); } /// public void Disable() { Get().Disable(); } /// public bool enabled => Get().enabled; /// /// Implicitly converts an to an instance. /// public static implicit operator InputActionMap(CameraControlsActions set) { return set.Get(); } /// /// Adds , and callbacks provided via on all input actions contained in this map. /// /// Callback instance. /// /// If is null or have already been added this method does nothing. /// /// public void AddCallbacks(ICameraControlsActions instance) { if (instance == null || m_Wrapper.m_CameraControlsActionsCallbackInterfaces.Contains(instance)) return; m_Wrapper.m_CameraControlsActionsCallbackInterfaces.Add(instance); @ChangeCamera.started += instance.OnChangeCamera; @ChangeCamera.performed += instance.OnChangeCamera; @ChangeCamera.canceled += instance.OnChangeCamera; @CameraRotation.started += instance.OnCameraRotation; @CameraRotation.performed += instance.OnCameraRotation; @CameraRotation.canceled += instance.OnCameraRotation; @CameraPanning.started += instance.OnCameraPanning; @CameraPanning.performed += instance.OnCameraPanning; @CameraPanning.canceled += instance.OnCameraPanning; @CameraRotationModifier.started += instance.OnCameraRotationModifier; @CameraRotationModifier.performed += instance.OnCameraRotationModifier; @CameraRotationModifier.canceled += instance.OnCameraRotationModifier; @CameraPanningModifier.started += instance.OnCameraPanningModifier; @CameraPanningModifier.performed += instance.OnCameraPanningModifier; @CameraPanningModifier.canceled += instance.OnCameraPanningModifier; @CameraZoom.started += instance.OnCameraZoom; @CameraZoom.performed += instance.OnCameraZoom; @CameraZoom.canceled += instance.OnCameraZoom; } /// /// Removes , and callbacks provided via on all input actions contained in this map. /// /// /// Calling this method when have not previously been registered has no side-effects. /// /// private void UnregisterCallbacks(ICameraControlsActions instance) { @ChangeCamera.started -= instance.OnChangeCamera; @ChangeCamera.performed -= instance.OnChangeCamera; @ChangeCamera.canceled -= instance.OnChangeCamera; @CameraRotation.started -= instance.OnCameraRotation; @CameraRotation.performed -= instance.OnCameraRotation; @CameraRotation.canceled -= instance.OnCameraRotation; @CameraPanning.started -= instance.OnCameraPanning; @CameraPanning.performed -= instance.OnCameraPanning; @CameraPanning.canceled -= instance.OnCameraPanning; @CameraRotationModifier.started -= instance.OnCameraRotationModifier; @CameraRotationModifier.performed -= instance.OnCameraRotationModifier; @CameraRotationModifier.canceled -= instance.OnCameraRotationModifier; @CameraPanningModifier.started -= instance.OnCameraPanningModifier; @CameraPanningModifier.performed -= instance.OnCameraPanningModifier; @CameraPanningModifier.canceled -= instance.OnCameraPanningModifier; @CameraZoom.started -= instance.OnCameraZoom; @CameraZoom.performed -= instance.OnCameraZoom; @CameraZoom.canceled -= instance.OnCameraZoom; } /// /// Unregisters and unregisters all input action callbacks via . /// /// public void RemoveCallbacks(ICameraControlsActions instance) { if (m_Wrapper.m_CameraControlsActionsCallbackInterfaces.Remove(instance)) UnregisterCallbacks(instance); } /// /// Replaces all existing callback instances and previously registered input action callbacks associated with them with callbacks provided via . /// /// /// If is null, calling this method will only unregister all existing callbacks but not register any new callbacks. /// /// /// /// public void SetCallbacks(ICameraControlsActions instance) { foreach (var item in m_Wrapper.m_CameraControlsActionsCallbackInterfaces) UnregisterCallbacks(item); m_Wrapper.m_CameraControlsActionsCallbackInterfaces.Clear(); AddCallbacks(instance); } } /// /// Provides a new instance referencing this action map. /// public CameraControlsActions @CameraControls => new CameraControlsActions(this); // SceneControls private readonly InputActionMap m_SceneControls; private List m_SceneControlsActionsCallbackInterfaces = new List(); private readonly InputAction m_SceneControls_ChangeVehicle; private readonly InputAction m_SceneControls_FPSMovement; private readonly InputAction m_SceneControls_ToggleGUI; private readonly InputAction m_SceneControls_DragObjectModifier; private readonly InputAction m_SceneControls_ShowCursor; /// /// Provides access to input actions defined in input action map "SceneControls". /// public struct SceneControlsActions { private @SceneInputActions m_Wrapper; /// /// Construct a new instance of the input action map wrapper class. /// public SceneControlsActions(@SceneInputActions wrapper) { m_Wrapper = wrapper; } /// /// Provides access to the underlying input action "SceneControls/ChangeVehicle". /// public InputAction @ChangeVehicle => m_Wrapper.m_SceneControls_ChangeVehicle; /// /// Provides access to the underlying input action "SceneControls/FPSMovement". /// public InputAction @FPSMovement => m_Wrapper.m_SceneControls_FPSMovement; /// /// Provides access to the underlying input action "SceneControls/ToggleGUI". /// public InputAction @ToggleGUI => m_Wrapper.m_SceneControls_ToggleGUI; /// /// Provides access to the underlying input action "SceneControls/DragObjectModifier". /// public InputAction @DragObjectModifier => m_Wrapper.m_SceneControls_DragObjectModifier; /// /// Provides access to the underlying input action "SceneControls/ShowCursor". /// public InputAction @ShowCursor => m_Wrapper.m_SceneControls_ShowCursor; /// /// Provides access to the underlying input action map instance. /// public InputActionMap Get() { return m_Wrapper.m_SceneControls; } /// public void Enable() { Get().Enable(); } /// public void Disable() { Get().Disable(); } /// public bool enabled => Get().enabled; /// /// Implicitly converts an to an instance. /// public static implicit operator InputActionMap(SceneControlsActions set) { return set.Get(); } /// /// Adds , and callbacks provided via on all input actions contained in this map. /// /// Callback instance. /// /// If is null or have already been added this method does nothing. /// /// public void AddCallbacks(ISceneControlsActions instance) { if (instance == null || m_Wrapper.m_SceneControlsActionsCallbackInterfaces.Contains(instance)) return; m_Wrapper.m_SceneControlsActionsCallbackInterfaces.Add(instance); @ChangeVehicle.started += instance.OnChangeVehicle; @ChangeVehicle.performed += instance.OnChangeVehicle; @ChangeVehicle.canceled += instance.OnChangeVehicle; @FPSMovement.started += instance.OnFPSMovement; @FPSMovement.performed += instance.OnFPSMovement; @FPSMovement.canceled += instance.OnFPSMovement; @ToggleGUI.started += instance.OnToggleGUI; @ToggleGUI.performed += instance.OnToggleGUI; @ToggleGUI.canceled += instance.OnToggleGUI; @DragObjectModifier.started += instance.OnDragObjectModifier; @DragObjectModifier.performed += instance.OnDragObjectModifier; @DragObjectModifier.canceled += instance.OnDragObjectModifier; @ShowCursor.started += instance.OnShowCursor; @ShowCursor.performed += instance.OnShowCursor; @ShowCursor.canceled += instance.OnShowCursor; } /// /// Removes , and callbacks provided via on all input actions contained in this map. /// /// /// Calling this method when have not previously been registered has no side-effects. /// /// private void UnregisterCallbacks(ISceneControlsActions instance) { @ChangeVehicle.started -= instance.OnChangeVehicle; @ChangeVehicle.performed -= instance.OnChangeVehicle; @ChangeVehicle.canceled -= instance.OnChangeVehicle; @FPSMovement.started -= instance.OnFPSMovement; @FPSMovement.performed -= instance.OnFPSMovement; @FPSMovement.canceled -= instance.OnFPSMovement; @ToggleGUI.started -= instance.OnToggleGUI; @ToggleGUI.performed -= instance.OnToggleGUI; @ToggleGUI.canceled -= instance.OnToggleGUI; @DragObjectModifier.started -= instance.OnDragObjectModifier; @DragObjectModifier.performed -= instance.OnDragObjectModifier; @DragObjectModifier.canceled -= instance.OnDragObjectModifier; @ShowCursor.started -= instance.OnShowCursor; @ShowCursor.performed -= instance.OnShowCursor; @ShowCursor.canceled -= instance.OnShowCursor; } /// /// Unregisters and unregisters all input action callbacks via . /// /// public void RemoveCallbacks(ISceneControlsActions instance) { if (m_Wrapper.m_SceneControlsActionsCallbackInterfaces.Remove(instance)) UnregisterCallbacks(instance); } /// /// Replaces all existing callback instances and previously registered input action callbacks associated with them with callbacks provided via . /// /// /// If is null, calling this method will only unregister all existing callbacks but not register any new callbacks. /// /// /// /// public void SetCallbacks(ISceneControlsActions instance) { foreach (var item in m_Wrapper.m_SceneControlsActionsCallbackInterfaces) UnregisterCallbacks(item); m_Wrapper.m_SceneControlsActionsCallbackInterfaces.Clear(); AddCallbacks(instance); } } /// /// Provides a new instance referencing this action map. /// public SceneControlsActions @SceneControls => new SceneControlsActions(this); /// /// Interface to implement callback methods for all input action callbacks associated with input actions defined by "CameraControls" which allows adding and removing callbacks. /// /// /// public interface ICameraControlsActions { /// /// Method invoked when associated input action "ChangeCamera" is either , or . /// /// /// /// void OnChangeCamera(InputAction.CallbackContext context); /// /// Method invoked when associated input action "CameraRotation" is either , or . /// /// /// /// void OnCameraRotation(InputAction.CallbackContext context); /// /// Method invoked when associated input action "CameraPanning" is either , or . /// /// /// /// void OnCameraPanning(InputAction.CallbackContext context); /// /// Method invoked when associated input action "CameraRotationModifier" is either , or . /// /// /// /// void OnCameraRotationModifier(InputAction.CallbackContext context); /// /// Method invoked when associated input action "CameraPanningModifier" is either , or . /// /// /// /// void OnCameraPanningModifier(InputAction.CallbackContext context); /// /// Method invoked when associated input action "CameraZoom" is either , or . /// /// /// /// void OnCameraZoom(InputAction.CallbackContext context); } /// /// Interface to implement callback methods for all input action callbacks associated with input actions defined by "SceneControls" which allows adding and removing callbacks. /// /// /// public interface ISceneControlsActions { /// /// Method invoked when associated input action "ChangeVehicle" is either , or . /// /// /// /// void OnChangeVehicle(InputAction.CallbackContext context); /// /// Method invoked when associated input action "FPSMovement" is either , or . /// /// /// /// void OnFPSMovement(InputAction.CallbackContext context); /// /// Method invoked when associated input action "ToggleGUI" is either , or . /// /// /// /// void OnToggleGUI(InputAction.CallbackContext context); /// /// Method invoked when associated input action "DragObjectModifier" is either , or . /// /// /// /// void OnDragObjectModifier(InputAction.CallbackContext context); /// /// Method invoked when associated input action "ShowCursor" is either , or . /// /// /// /// void OnShowCursor(InputAction.CallbackContext context); } } }