update packages, fix cinemachine

This commit is contained in:
2024-11-21 17:41:25 +02:00
parent 3a072785e2
commit 35837405a5
16 changed files with 714 additions and 324 deletions
@@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was auto-generated by com.unity.inputsystem:InputActionCodeGenerator
// version 1.8.2
// version 1.11.2
// from Assets/Scripts/Managers/InputSystem/InputActions.inputactions
//
// Changes to this file may cause incorrect behavior and will be lost if
@@ -14,7 +14,6 @@ using System.Collections;
using System.Collections.Generic;
using UnityEngine.InputSystem;
using UnityEngine.InputSystem.Utilities;
using UnityEngine;
public partial class @InputActions: IInputActionCollection2, IDisposable
{
@@ -32,6 +31,15 @@ public partial class @InputActions: IInputActionCollection2, IDisposable
""name"": ""PointClick"",
""type"": ""Button"",
""id"": ""fb720cef-8db9-45ea-94b8-34ee20907014"",
""expectedControlType"": """",
""processors"": """",
""interactions"": """",
""initialStateCheck"": false
},
{
""name"": ""CancelClick"",
""type"": ""Button"",
""id"": ""a045f2ab-c0ec-42fc-9343-39839caf2ba4"",
""expectedControlType"": ""Button"",
""processors"": """",
""interactions"": """",
@@ -60,6 +68,28 @@ public partial class @InputActions: IInputActionCollection2, IDisposable
""action"": ""PointClick"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""f43a2e12-ac25-49ce-95aa-43fd4e3754b2"",
""path"": ""<Mouse>/rightButton"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""CancelClick"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""2c0753e9-8ef2-43b1-893f-d360ac7a34d3"",
""path"": ""<Gamepad>/buttonWest"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""CancelClick"",
""isComposite"": false,
""isPartOfComposite"": false
}
]
},
@@ -89,7 +119,7 @@ public partial class @InputActions: IInputActionCollection2, IDisposable
""name"": ""Zoom"",
""type"": ""Value"",
""id"": ""41d86dbc-39e0-4655-bc19-0eab9d5014a6"",
""expectedControlType"": ""Vector2"",
""expectedControlType"": """",
""processors"": """",
""interactions"": """",
""initialStateCheck"": true
@@ -307,16 +337,44 @@ public partial class @InputActions: IInputActionCollection2, IDisposable
},
{
""name"": """",
""id"": ""8e2aefc6-bf10-4653-8782-6b92d5efc35a"",
""path"": ""<Mouse>/scroll"",
""id"": ""1a09948a-e3d8-4dc0-a257-95fa88786135"",
""path"": ""<Mouse>/scroll/y"",
""interactions"": """",
""processors"": ""NormalizeVector2,InvertVector2(invertX=false)"",
""processors"": """",
""groups"": """",
""action"": ""Zoom"",
""isComposite"": false,
""isPartOfComposite"": false
}
]
},
{
""name"": ""UI"",
""id"": ""1ad3f945-dcff-4ae6-8a8b-3dd44bd67684"",
""actions"": [
{
""name"": ""Click"",
""type"": ""Button"",
""id"": ""cddc5ce5-b808-4da9-b23b-f24a5126f838"",
""expectedControlType"": ""Button"",
""processors"": """",
""interactions"": """",
""initialStateCheck"": false
}
],
""bindings"": [
{
""name"": """",
""id"": ""a16b8b36-6be6-4d2c-85da-20d72f3c8e79"",
""path"": ""<Mouse>/leftButton"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""Click"",
""isComposite"": false,
""isPartOfComposite"": false
}
]
}
],
""controlSchemes"": []
@@ -324,17 +382,22 @@ public partial class @InputActions: IInputActionCollection2, IDisposable
// Player
m_Player = asset.FindActionMap("Player", throwIfNotFound: true);
m_Player_PointClick = m_Player.FindAction("PointClick", throwIfNotFound: true);
m_Player_CancelClick = m_Player.FindAction("CancelClick", throwIfNotFound: true);
// Camera
m_Camera = asset.FindActionMap("Camera", throwIfNotFound: true);
m_Camera_Move = m_Camera.FindAction("Move", throwIfNotFound: true);
m_Camera_Rotate = m_Camera.FindAction("Rotate", throwIfNotFound: true);
m_Camera_Zoom = m_Camera.FindAction("Zoom", throwIfNotFound: true);
// UI
m_UI = asset.FindActionMap("UI", throwIfNotFound: true);
m_UI_Click = m_UI.FindAction("Click", throwIfNotFound: true);
}
~@InputActions()
{
Debug.Assert(!m_Player.enabled, "This will cause a leak and performance issues, InputActions.Player.Disable() has not been called.");
Debug.Assert(!m_Camera.enabled, "This will cause a leak and performance issues, InputActions.Camera.Disable() has not been called.");
UnityEngine.Debug.Assert(!m_Player.enabled, "This will cause a leak and performance issues, InputActions.Player.Disable() has not been called.");
UnityEngine.Debug.Assert(!m_Camera.enabled, "This will cause a leak and performance issues, InputActions.Camera.Disable() has not been called.");
UnityEngine.Debug.Assert(!m_UI.enabled, "This will cause a leak and performance issues, InputActions.UI.Disable() has not been called.");
}
public void Dispose()
@@ -397,11 +460,13 @@ public partial class @InputActions: IInputActionCollection2, IDisposable
private readonly InputActionMap m_Player;
private List<IPlayerActions> m_PlayerActionsCallbackInterfaces = new List<IPlayerActions>();
private readonly InputAction m_Player_PointClick;
private readonly InputAction m_Player_CancelClick;
public struct PlayerActions
{
private @InputActions m_Wrapper;
public PlayerActions(@InputActions wrapper) { m_Wrapper = wrapper; }
public InputAction @PointClick => m_Wrapper.m_Player_PointClick;
public InputAction @CancelClick => m_Wrapper.m_Player_CancelClick;
public InputActionMap Get() { return m_Wrapper.m_Player; }
public void Enable() { Get().Enable(); }
public void Disable() { Get().Disable(); }
@@ -414,6 +479,9 @@ public partial class @InputActions: IInputActionCollection2, IDisposable
@PointClick.started += instance.OnPointClick;
@PointClick.performed += instance.OnPointClick;
@PointClick.canceled += instance.OnPointClick;
@CancelClick.started += instance.OnCancelClick;
@CancelClick.performed += instance.OnCancelClick;
@CancelClick.canceled += instance.OnCancelClick;
}
private void UnregisterCallbacks(IPlayerActions instance)
@@ -421,6 +489,9 @@ public partial class @InputActions: IInputActionCollection2, IDisposable
@PointClick.started -= instance.OnPointClick;
@PointClick.performed -= instance.OnPointClick;
@PointClick.canceled -= instance.OnPointClick;
@CancelClick.started -= instance.OnCancelClick;
@CancelClick.performed -= instance.OnCancelClick;
@CancelClick.canceled -= instance.OnCancelClick;
}
public void RemoveCallbacks(IPlayerActions instance)
@@ -500,9 +571,56 @@ public partial class @InputActions: IInputActionCollection2, IDisposable
}
}
public CameraActions @Camera => new CameraActions(this);
// UI
private readonly InputActionMap m_UI;
private List<IUIActions> m_UIActionsCallbackInterfaces = new List<IUIActions>();
private readonly InputAction m_UI_Click;
public struct UIActions
{
private @InputActions m_Wrapper;
public UIActions(@InputActions wrapper) { m_Wrapper = wrapper; }
public InputAction @Click => m_Wrapper.m_UI_Click;
public InputActionMap Get() { return m_Wrapper.m_UI; }
public void Enable() { Get().Enable(); }
public void Disable() { Get().Disable(); }
public bool enabled => Get().enabled;
public static implicit operator InputActionMap(UIActions set) { return set.Get(); }
public void AddCallbacks(IUIActions instance)
{
if (instance == null || m_Wrapper.m_UIActionsCallbackInterfaces.Contains(instance)) return;
m_Wrapper.m_UIActionsCallbackInterfaces.Add(instance);
@Click.started += instance.OnClick;
@Click.performed += instance.OnClick;
@Click.canceled += instance.OnClick;
}
private void UnregisterCallbacks(IUIActions instance)
{
@Click.started -= instance.OnClick;
@Click.performed -= instance.OnClick;
@Click.canceled -= instance.OnClick;
}
public void RemoveCallbacks(IUIActions instance)
{
if (m_Wrapper.m_UIActionsCallbackInterfaces.Remove(instance))
UnregisterCallbacks(instance);
}
public void SetCallbacks(IUIActions instance)
{
foreach (var item in m_Wrapper.m_UIActionsCallbackInterfaces)
UnregisterCallbacks(item);
m_Wrapper.m_UIActionsCallbackInterfaces.Clear();
AddCallbacks(instance);
}
}
public UIActions @UI => new UIActions(this);
public interface IPlayerActions
{
void OnPointClick(InputAction.CallbackContext context);
void OnCancelClick(InputAction.CallbackContext context);
}
public interface ICameraActions
{
@@ -510,4 +628,8 @@ public partial class @InputActions: IInputActionCollection2, IDisposable
void OnRotate(InputAction.CallbackContext context);
void OnZoom(InputAction.CallbackContext context);
}
public interface IUIActions
{
void OnClick(InputAction.CallbackContext context);
}
}