From 35837405a59e6bfd056219c2c759a094ac60306d Mon Sep 17 00:00:00 2001 From: Vladimir Date: Thu, 21 Nov 2024 17:41:25 +0200 Subject: [PATCH] update packages, fix cinemachine --- Assets/InputSystem.inputsettings.asset | 41 ++ Assets/InputSystem.inputsettings.asset.meta | 8 + Assets/Prefabs/UI/RadialMenuItem.prefab | 60 +- Assets/Scenes/MainScene.unity | 511 ++++++++++-------- Assets/Scripts/Managers/CameraSystem.cs | 39 +- Assets/Scripts/Managers/InGameMouseHandler.cs | 5 +- .../Managers/InputSystem/InputActions.cs | 138 ++++- .../InputSystem/InputActions.inputactions | 67 ++- Assets/Scripts/UIElements/RadialMenuItem.cs | 10 +- Assets/UI Toolkit/PanelSettings.asset | 3 + ...niversalRenderPipelineGlobalSettings.asset | 17 +- Packages/manifest.json | 17 +- Packages/packages-lock.json | 110 ++-- ProjectSettings/EditorBuildSettings.asset | 6 +- ProjectSettings/ProjectVersion.txt | 4 +- ProjectSettings/ShaderGraphSettings.asset | 2 + 16 files changed, 714 insertions(+), 324 deletions(-) create mode 100644 Assets/InputSystem.inputsettings.asset create mode 100644 Assets/InputSystem.inputsettings.asset.meta diff --git a/Assets/InputSystem.inputsettings.asset b/Assets/InputSystem.inputsettings.asset new file mode 100644 index 00000000..e118b8d4 --- /dev/null +++ b/Assets/InputSystem.inputsettings.asset @@ -0,0 +1,41 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c46f07b5ed07e4e92aa78254188d3d10, type: 3} + m_Name: InputSystem.inputsettings + m_EditorClassIdentifier: + m_SupportedDevices: + - Keyboard + - Mouse + - Gamepad + m_UpdateMode: 1 + m_ScrollDeltaBehavior: 0 + m_MaxEventBytesPerUpdate: 5242880 + m_MaxQueuedEventsPerUpdate: 1000 + m_CompensateForScreenOrientation: 1 + m_BackgroundBehavior: 0 + m_EditorInputBehaviorInPlayMode: 0 + m_InputActionPropertyDrawerMode: 0 + m_DefaultDeadzoneMin: 0.125 + m_DefaultDeadzoneMax: 0.925 + m_DefaultButtonPressPoint: 0.5 + m_ButtonReleaseThreshold: 0.75 + m_DefaultTapTime: 0.2 + m_DefaultSlowTapTime: 0.5 + m_DefaultHoldTime: 0.4 + m_TapRadius: 5 + m_MultiTapDelayTime: 0.75 + m_DisableRedundantEventsMerging: 0 + m_ShortcutKeysConsumeInputs: 0 + m_iOSSettings: + m_MotionUsage: + m_Enabled: 0 + m_Description: diff --git a/Assets/InputSystem.inputsettings.asset.meta b/Assets/InputSystem.inputsettings.asset.meta new file mode 100644 index 00000000..f6c0c6d2 --- /dev/null +++ b/Assets/InputSystem.inputsettings.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 26c97fb797b6ccd4db2408be213f101d +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/UI/RadialMenuItem.prefab b/Assets/Prefabs/UI/RadialMenuItem.prefab index 989303a6..34820d1b 100644 --- a/Assets/Prefabs/UI/RadialMenuItem.prefab +++ b/Assets/Prefabs/UI/RadialMenuItem.prefab @@ -12,6 +12,8 @@ GameObject: - component: {fileID: 7523537103864575754} - component: {fileID: 6614086836352695636} - component: {fileID: 8504314472782682815} + - component: {fileID: 994226882788141464} + - component: {fileID: -1890459355742183395} m_Layer: 0 m_Name: RadialMenuItem m_TagString: Untagged @@ -37,7 +39,7 @@ RectTransform: m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 150, y: 30} + m_SizeDelta: {x: 350, y: 80} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &7523537103864575754 CanvasRenderer: @@ -133,6 +135,52 @@ MonoBehaviour: m_StringArgument: m_BoolArgument: 0 m_CallState: 2 +--- !u!223 &994226882788141464 +Canvas: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 492131538223937763} + m_Enabled: 1 + serializedVersion: 3 + m_RenderMode: 2 + m_Camera: {fileID: 0} + m_PlaneDistance: 100 + m_PixelPerfect: 0 + m_ReceivesEvents: 1 + m_OverrideSorting: 0 + m_OverridePixelPerfect: 0 + m_SortingBucketNormalizedSize: 0 + m_VertexColorAlwaysGammaSpace: 0 + m_AdditionalShaderChannelsFlag: 25 + m_UpdateRectTransformForStandalone: 0 + m_SortingLayerID: 0 + m_SortingOrder: 0 + m_TargetDisplay: 0 +--- !u!114 &-1890459355742183395 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 492131538223937763} + m_Enabled: 0 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UiScaleMode: 1 + m_ReferencePixelsPerUnit: 100 + m_ScaleFactor: 1 + m_ReferenceResolution: {x: 1920, y: 1024} + m_ScreenMatchMode: 0 + m_MatchWidthOrHeight: 0 + m_PhysicalUnit: 3 + m_FallbackScreenDPI: 96 + m_DefaultSpriteDPI: 96 + m_DynamicPixelsPerUnit: 200 + m_PresetInfoIsWorld: 1 --- !u!1 &1152554228420413990 GameObject: m_ObjectHideFlags: 0 @@ -207,8 +255,8 @@ MonoBehaviour: m_fontMaterials: [] m_fontColor32: serializedVersion: 2 - rgba: 4281479730 - m_fontColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + rgba: 4278584838 + m_fontColor: {r: 0.025157154, g: 0.025157154, b: 0.025157154, a: 1} m_enableVertexGradient: 0 m_colorMode: 3 m_fontColorGradient: @@ -225,10 +273,10 @@ MonoBehaviour: m_faceColor: serializedVersion: 2 rgba: 4294967295 - m_fontSize: 20 - m_fontSizeBase: 20 + m_fontSize: 71.6 + m_fontSizeBase: 50 m_fontWeight: 400 - m_enableAutoSizing: 0 + m_enableAutoSizing: 1 m_fontSizeMin: 18 m_fontSizeMax: 72 m_fontStyle: 0 diff --git a/Assets/Scenes/MainScene.unity b/Assets/Scenes/MainScene.unity index 84731085..3f5567fd 100644 --- a/Assets/Scenes/MainScene.unity +++ b/Assets/Scenes/MainScene.unity @@ -38,12 +38,12 @@ RenderSettings: m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 0} - m_IndirectSpecularColor: {r: 0.18028378, g: 0.22571412, b: 0.30692285, a: 1} m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: m_ObjectHideFlags: 0 - serializedVersion: 12 + serializedVersion: 13 + m_BakeOnSceneLoad: 0 m_GISettings: serializedVersion: 2 m_BounceScale: 1 @@ -171,6 +171,7 @@ MeshRenderer: m_RayTraceProcedural: 0 m_RayTracingAccelStructBuildFlagsOverride: 0 m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -462,6 +463,178 @@ Transform: - {fileID: 68734955} m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 90, z: 0} +--- !u!1 &182040536 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 182040538} + - component: {fileID: 182040537} + - component: {fileID: 182040540} + - component: {fileID: 182040541} + m_Layer: 0 + m_Name: CinemachineCamera + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &182040537 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 182040536} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f9dfa5b682dcd46bda6128250e975f58, type: 3} + m_Name: + m_EditorClassIdentifier: + Priority: + Enabled: 0 + m_Value: 0 + OutputChannel: 1 + StandbyUpdate: 2 + m_StreamingVersion: 20241001 + m_LegacyPriority: 0 + Target: + TrackingTarget: {fileID: 1259932647} + LookAtTarget: {fileID: 0} + CustomLookAtTarget: 0 + Lens: + FieldOfView: 60 + OrthographicSize: 5 + NearClipPlane: 0.1 + FarClipPlane: 100 + Dutch: 0 + ModeOverride: 0 + PhysicalProperties: + GateFit: 2 + SensorSize: {x: 21.946, y: 16.002} + LensShift: {x: 0, y: 0} + FocusDistance: 10 + Iso: 200 + ShutterSpeed: 0.005 + Aperture: 16 + BladeCount: 5 + Curvature: {x: 2, y: 11} + BarrelClipping: 0.25 + Anamorphism: 0 + BlendHint: 0 +--- !u!4 &182040538 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 182040536} + serializedVersion: 2 + m_LocalRotation: {x: 0.21470922, y: -2.8246667e-16, z: -5.0453756e-16, w: 0.976678} + m_LocalPosition: {x: 29.11, y: 0, z: -10} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1976674304} + m_LocalEulerAnglesHint: {x: 45, y: 0, z: 0} +--- !u!114 &182040540 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 182040536} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b617507da6d07e749b7efdb34e1173e1, type: 3} + m_Name: + m_EditorClassIdentifier: + TrackerSettings: + BindingMode: 4 + PositionDamping: {x: 1, y: 1, z: 1} + AngularDampingMode: 0 + RotationDamping: {x: 1, y: 1, z: 1} + QuaternionDamping: 1 + FollowOffset: {x: 0, y: 0, z: -10} +--- !u!114 &182040541 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 182040536} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f38bda98361e1de48a4ca2bd86ea3c17, type: 3} + m_Name: + m_EditorClassIdentifier: + Composition: + ScreenPosition: {x: 0, y: 0} + DeadZone: + Enabled: 0 + Size: {x: 0.2, y: 0.2} + HardLimits: + Enabled: 0 + Size: {x: 0.8, y: 0.8} + Offset: {x: 0, y: 0} + CenterOnActivate: 1 + TargetOffset: {x: 0, y: -4.62, z: 0} + Damping: {x: 0.5, y: 0.5} + Lookahead: + Enabled: 0 + Time: 0 + Smoothing: 0 + IgnoreY: 0 +--- !u!1 &314976161 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 314976162} + - component: {fileID: 314976163} + m_Layer: 0 + m_Name: Event System + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &314976162 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 314976161} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1976674304} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &314976163 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 314976161} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3} + m_Name: + m_EditorClassIdentifier: + m_FirstSelected: {fileID: 0} + m_sendNavigationEvents: 1 + m_DragThreshold: 10 --- !u!1 &580921796 GameObject: m_ObjectHideFlags: 0 @@ -482,21 +655,25 @@ GameObject: m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!4 &580921797 -Transform: +--- !u!224 &580921797 +RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 580921796} - serializedVersion: 2 - m_LocalRotation: {x: 0.3826835, y: 0.000000022481231, z: -0.000000009312033, w: 0.9238795} - m_LocalPosition: {x: 29.11, y: 5, z: -5} + m_LocalRotation: {x: 0.21470924, y: -4.1335915e-16, z: 9.0871316e-17, w: 0.976678} + m_LocalPosition: {x: 0, y: 0, z: -10} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1976674304} m_LocalEulerAnglesHint: {x: 57.16, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 29.11, y: 0} + m_SizeDelta: {x: 594.6667, y: 299.66666} + m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &580921798 MonoBehaviour: m_ObjectHideFlags: 0 @@ -509,28 +686,26 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 72ece51f2901e7445ab60da3685d6b5f, type: 3} m_Name: m_EditorClassIdentifier: - m_ShowDebugText: 0 - m_ShowCameraFrustum: 1 - m_IgnoreTimeScale: 0 - m_WorldUpOverride: {fileID: 0} - m_UpdateMethod: 2 - m_BlendUpdateMethod: 1 - m_DefaultBlend: - m_Style: 1 - m_Time: 2 - m_CustomCurve: + ShowDebugText: 0 + ShowCameraFrustum: 1 + IgnoreTimeScale: 0 + WorldUpOverride: {fileID: 0} + ChannelMask: -1 + UpdateMethod: 2 + BlendUpdateMethod: 1 + LensModeOverride: + Enabled: 0 + DefaultMode: 2 + DefaultBlend: + Style: 1 + Time: 2 + CustomCurve: serializedVersion: 2 m_Curve: [] m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 - m_CustomBlends: {fileID: 0} - m_CameraCutEvent: - m_PersistentCalls: - m_Calls: [] - m_CameraActivatedEvent: - m_PersistentCalls: - m_Calls: [] + CustomBlends: {fileID: 0} --- !u!114 &580921799 MonoBehaviour: m_ObjectHideFlags: 0 @@ -616,7 +791,7 @@ Camera: height: 1 near clip plane: 0.1 far clip plane: 100 - field of view: 60.000004 + field of view: 60 orthographic: 0 orthographic size: 5 m_Depth: -1 @@ -848,6 +1023,9 @@ MonoBehaviour: sourceAsset: {fileID: 9197481963319205126, guid: f56df0e5e8c60e241a519804b41d2e2d, type: 3} m_SortingOrder: 0 + m_WorldSpaceSizeMode: 1 + m_WorldSpaceWidth: 1920 + m_WorldSpaceHeight: 1080 --- !u!114 &715788845 MonoBehaviour: m_ObjectHideFlags: 0 @@ -975,8 +1153,12 @@ Light: m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} m_UseBoundingSphereOverride: 0 m_UseViewFrustumForShadowCasterCull: 1 + m_ForceVisible: 0 m_ShadowRadius: 0 m_ShadowAngle: 0 + m_LightUnit: 1 + m_LuxAtDistance: 1 + m_EnableSpotReflector: 1 --- !u!1 &940848059 GameObject: m_ObjectHideFlags: 0 @@ -1323,100 +1505,10 @@ Transform: m_ConstrainProportionsScale: 0 m_Children: - {fileID: 1976674304} - - {fileID: 1221533582} - {fileID: 1737216623} - {fileID: 856666919} m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1221533581 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1221533582} - - component: {fileID: 1221533584} - - component: {fileID: 1221533583} - m_Layer: 0 - m_Name: EventSystem - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1221533582 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1221533581} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1098219117} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &1221533583 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1221533581} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 01614664b831546d2ae94a42149d80ac, type: 3} - m_Name: - m_EditorClassIdentifier: - m_SendPointerHoverToParent: 1 - m_MoveRepeatDelay: 0.5 - m_MoveRepeatRate: 0.1 - m_XRTrackingOrigin: {fileID: 0} - m_ActionsAsset: {fileID: -944628639613478452, guid: ca9f5fa95ffab41fb9a615ab714db018, - type: 3} - m_PointAction: {fileID: -1654692200621890270, guid: ca9f5fa95ffab41fb9a615ab714db018, - type: 3} - m_MoveAction: {fileID: -8784545083839296357, guid: ca9f5fa95ffab41fb9a615ab714db018, - type: 3} - m_SubmitAction: {fileID: 392368643174621059, guid: ca9f5fa95ffab41fb9a615ab714db018, - type: 3} - m_CancelAction: {fileID: 7727032971491509709, guid: ca9f5fa95ffab41fb9a615ab714db018, - type: 3} - m_LeftClickAction: {fileID: 3001919216989983466, guid: ca9f5fa95ffab41fb9a615ab714db018, - type: 3} - m_MiddleClickAction: {fileID: -2185481485913320682, guid: ca9f5fa95ffab41fb9a615ab714db018, - type: 3} - m_RightClickAction: {fileID: -4090225696740746782, guid: ca9f5fa95ffab41fb9a615ab714db018, - type: 3} - m_ScrollWheelAction: {fileID: 6240969308177333660, guid: ca9f5fa95ffab41fb9a615ab714db018, - type: 3} - m_TrackedDevicePositionAction: {fileID: 6564999863303420839, guid: ca9f5fa95ffab41fb9a615ab714db018, - type: 3} - m_TrackedDeviceOrientationAction: {fileID: 7970375526676320489, guid: ca9f5fa95ffab41fb9a615ab714db018, - type: 3} - m_DeselectOnBackgroundClick: 1 - m_PointerBehavior: 0 - m_CursorLockBehavior: 0 ---- !u!114 &1221533584 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1221533581} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3} - m_Name: - m_EditorClassIdentifier: - m_FirstSelected: {fileID: 0} - m_sendNavigationEvents: 1 - m_DragThreshold: 10 --- !u!1 &1259932645 GameObject: m_ObjectHideFlags: 0 @@ -1447,7 +1539,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: _mainCamera: {fileID: 580921801} - _camera: {fileID: 1758781747} + _camera: {fileID: 182040537} _fieldOfViewMax: 50 _fieldOfViewMin: 10 _followOffsetMin: 5 @@ -1509,101 +1601,6 @@ Transform: - {fileID: 1006829695} m_Father: {fileID: 1737216623} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1366645195 -GameObject: - m_ObjectHideFlags: 3 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1366645196} - - component: {fileID: 1366645199} - - component: {fileID: 1366645198} - - component: {fileID: 1366645197} - m_Layer: 0 - m_Name: cm - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1366645196 -Transform: - m_ObjectHideFlags: 3 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1366645195} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1758781748} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &1366645197 -MonoBehaviour: - m_ObjectHideFlags: 3 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1366645195} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: f4044717213e31446939f7bd49c896ea, type: 3} - m_Name: - m_EditorClassIdentifier: - m_TrackedObjectOffset: {x: 0, y: 0, z: 0} - m_LookaheadTime: 0 - m_LookaheadSmoothing: 0 - m_LookaheadIgnoreY: 0 - m_HorizontalDamping: 0 - m_VerticalDamping: 0 - m_ScreenX: 0.5 - m_ScreenY: 0.5 - m_DeadZoneWidth: 0 - m_DeadZoneHeight: 0 - m_SoftZoneWidth: 0.8 - m_SoftZoneHeight: 0.8 - m_BiasX: 0 - m_BiasY: 0 - m_CenterOnActivate: 1 ---- !u!114 &1366645198 -MonoBehaviour: - m_ObjectHideFlags: 3 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1366645195} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: fa7155796051b734daa718462081dc5f, type: 3} - m_Name: - m_EditorClassIdentifier: - m_BindingMode: 1 - m_FollowOffset: {x: 0, y: 5, z: -5} - m_XDamping: 0 - m_YDamping: 0 - m_ZDamping: 0 - m_AngularDampingMode: 0 - m_PitchDamping: 0 - m_YawDamping: 0 - m_RollDamping: 0 - m_AngularDamping: 0 ---- !u!114 &1366645199 -MonoBehaviour: - m_ObjectHideFlags: 3 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1366645195} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: ac0b09e7857660247b1477e93731de29, type: 3} - m_Name: - m_EditorClassIdentifier: --- !u!1 &1580833476 GameObject: m_ObjectHideFlags: 0 @@ -1750,11 +1747,11 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3} m_Name: m_EditorClassIdentifier: - m_IgnoreReversedGraphics: 1 + m_IgnoreReversedGraphics: 0 m_BlockingObjects: 0 m_BlockingMask: serializedVersion: 2 - m_Bits: 4294967295 + m_Bits: 0 --- !u!114 &1737216625 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1770,7 +1767,7 @@ MonoBehaviour: m_UiScaleMode: 1 m_ReferencePixelsPerUnit: 100 m_ScaleFactor: 1 - m_ReferenceResolution: {x: 1920, y: 1080} + m_ReferenceResolution: {x: 1920, y: 1024} m_ScreenMatchMode: 0 m_MatchWidthOrHeight: 1 m_PhysicalUnit: 3 @@ -1817,7 +1814,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!114 &1758781747 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1830,12 +1827,13 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 45e653bab7fb20e499bda25e1b646fea, type: 3} m_Name: m_EditorClassIdentifier: - m_ExcludedPropertiesInInspector: - - m_Script - m_LockStageInInspector: - m_StreamingVersion: 20170927 - m_Priority: 10 - m_StandbyUpdate: 2 + Priority: + Enabled: 1 + m_Value: 10 + OutputChannel: 1 + StandbyUpdate: 2 + m_StreamingVersion: 20241001 + m_LegacyPriority: 0 m_LookAt: {fileID: 1259932647} m_Follow: {fileID: 1259932647} m_Lens: @@ -1845,18 +1843,31 @@ MonoBehaviour: FarClipPlane: 100 Dutch: 0 ModeOverride: 0 - LensShift: {x: 0, y: 0} GateFit: 2 - FocusDistance: 10 m_SensorSize: {x: 1, y: 1} - m_Transitions: + LensShift: {x: 0, y: 0} + FocusDistance: 10 + Iso: 200 + ShutterSpeed: 0.005 + Aperture: 16 + BladeCount: 5 + Curvature: {x: 2, y: 11} + BarrelClipping: 0.25 + Anamorphism: 0 + BlendHint: 0 + m_OnCameraLiveEvent: + m_PersistentCalls: + m_Calls: [] + m_ExcludedPropertiesInInspector: + - m_Script + m_LockStageInInspector: + m_LegacyTransitions: m_BlendHint: 0 m_InheritPosition: 0 m_OnCameraLive: m_PersistentCalls: m_Calls: [] - m_LegacyBlendHint: 0 - m_ComponentOwner: {fileID: 1366645196} + m_ComponentOwner: {fileID: 1916631401} --- !u!4 &1758781748 Transform: m_ObjectHideFlags: 0 @@ -1870,7 +1881,7 @@ Transform: m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: - - {fileID: 1366645196} + - {fileID: 1916631401} m_Father: {fileID: 1976674304} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1832846572 @@ -1950,6 +1961,50 @@ MonoBehaviour: m_ChildScaleWidth: 0 m_ChildScaleHeight: 0 m_ReverseArrangement: 0 +--- !u!1 &1916631400 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1916631401} + - component: {fileID: 1916631402} + m_Layer: 0 + m_Name: cm + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1916631401 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1916631400} + serializedVersion: 2 + m_LocalRotation: {x: -0.3826835, y: -0.000000022481231, z: 0.000000009312033, w: 0.9238795} + m_LocalPosition: {x: -29.110003, y: 35.63111, z: 42.70217} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1758781748} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1916631402 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1916631400} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ac0b09e7857660247b1477e93731de29, type: 3} + m_Name: + m_EditorClassIdentifier: --- !u!1 &1976674303 GameObject: m_ObjectHideFlags: 0 @@ -1980,8 +2035,10 @@ Transform: m_ConstrainProportionsScale: 0 m_Children: - {fileID: 580921797} + - {fileID: 182040538} - {fileID: 1758781748} - {fileID: 1259932647} + - {fileID: 314976162} m_Father: {fileID: 1098219117} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &2079311936 diff --git a/Assets/Scripts/Managers/CameraSystem.cs b/Assets/Scripts/Managers/CameraSystem.cs index a19d8788..a92ec81d 100644 --- a/Assets/Scripts/Managers/CameraSystem.cs +++ b/Assets/Scripts/Managers/CameraSystem.cs @@ -1,4 +1,4 @@ -using Cinemachine; +using Unity.Cinemachine; using UnityEngine; using UnityEngine.InputSystem; @@ -9,7 +9,7 @@ public class CameraSystem : MonoBehaviour public Camera MainCamera => _mainCamera; [SerializeField] - private CinemachineVirtualCamera _camera; + private CinemachineCamera _camera; [SerializeField] private float _fieldOfViewMax = 60f; [SerializeField] @@ -29,7 +29,7 @@ public class CameraSystem : MonoBehaviour [SerializeField] private bool _useMouseRotate; - private Vector3 _followOffset; + private Vector3 _followOffset =new Vector3(0,8,-10); [SerializeField] private float _rotateSpeed = 100f; [SerializeField] @@ -41,13 +41,12 @@ public class CameraSystem : MonoBehaviour [SerializeField] private float _zoomAmount = 3f; private float _targetFieldOfView = 60f; - private CinemachineTransposer _cinemachineTransposer; + private CinemachineFollow _cinemachineTransposer; private Bounds _worldBounds; private void Awake() { - _cinemachineTransposer = _camera.GetCinemachineComponent(); - _followOffset = _cinemachineTransposer.m_FollowOffset; + _cinemachineTransposer = _camera.GetCinemachineComponent(CinemachineCore.Stage.Body) as CinemachineFollow; } private void Start() @@ -82,7 +81,7 @@ public class CameraSystem : MonoBehaviour HandleCameraRotation(rotateDir, _rotateSpeed); } - float zoomAmount = GameManager.Instance.Input.CameraAction.Zoom.ReadValue().y; + float zoomAmount = GameManager.Instance.Input.CameraAction.Zoom.ReadValue(); if (zoomAmount != 0) { HandleCameraZoom_MoveY(zoomAmount); @@ -98,9 +97,10 @@ public class CameraSystem : MonoBehaviour private void HandleCameraZoom_MoveForward() { Vector3 zoomDir = _followOffset.normalized; - if (Input.mouseScrollDelta.y > 0) + var scrollDelta=GameManager.Instance.Input.CameraAction.Zoom.ReadValue(); + if (scrollDelta > 0) _followOffset -= zoomDir * _zoomAmount; - if (Input.mouseScrollDelta.y < 0) + if (scrollDelta < 0) _followOffset += zoomDir * _zoomAmount; if (_followOffset.magnitude < _followOffsetMin) @@ -109,9 +109,9 @@ public class CameraSystem : MonoBehaviour if (_followOffset.magnitude > _followOffsetMax) _followOffset = zoomDir * _followOffsetMax; - Vector3.Lerp(_cinemachineTransposer.m_FollowOffset, _followOffset, Time.deltaTime * _zoomSpeed); + Vector3.Lerp(_cinemachineTransposer.FollowOffset, _followOffset, Time.deltaTime * _zoomSpeed); - _cinemachineTransposer.m_FollowOffset = _followOffset; + _cinemachineTransposer.FollowOffset = _followOffset; } private void HandleCameraZoom_MoveY(float _zoomAmount) @@ -126,21 +126,22 @@ public class CameraSystem : MonoBehaviour if (_followOffset.magnitude > _followOffsetMax) _followOffset.y = _zoomAmount * _followOffsetMax; - Vector3.Lerp(_cinemachineTransposer.m_FollowOffset, _followOffset, Time.deltaTime * _zoomSpeed); + Vector3.Lerp(_cinemachineTransposer.FollowOffset, _followOffset, Time.deltaTime * _zoomSpeed); - _cinemachineTransposer.m_FollowOffset = _followOffset; + _cinemachineTransposer.FollowOffset = _followOffset; } private void HandleCameraZoom_FOV() { - if (Input.mouseScrollDelta.y > 0) + var scrollDelta = GameManager.Instance.Input.CameraAction.Zoom.ReadValue(); + if (scrollDelta > 0) _targetFieldOfView -= 5; - if (Input.mouseScrollDelta.y < 0) + if (scrollDelta < 0) _targetFieldOfView += 5; _targetFieldOfView = Mathf.Clamp(_targetFieldOfView, _fieldOfViewMin, _fieldOfViewMax); - Mathf.Lerp(_camera.m_Lens.FieldOfView, _targetFieldOfView, Time.deltaTime * _zoomSpeed); - _camera.m_Lens.FieldOfView = _targetFieldOfView; + Mathf.Lerp(_camera.Lens.FieldOfView, _targetFieldOfView, Time.deltaTime * _zoomSpeed); + _camera.Lens.FieldOfView = _targetFieldOfView; } private void HandleCameraMovement(Vector2 inputDir) @@ -186,10 +187,6 @@ public class CameraSystem : MonoBehaviour private void OnCameraRotate(InputAction.CallbackContext context) { - if (Mouse.current.middleButton.isPressed) - { - - } float rotateDir = GameManager.Instance.Input.CameraAction.Rotate.ReadValue().x; //HandleCameraRotation(rotationValue, _mouseRotationSpeed); transform.eulerAngles += new Vector3(0, rotateDir * _rotateSpeed * Time.deltaTime, 0); diff --git a/Assets/Scripts/Managers/InGameMouseHandler.cs b/Assets/Scripts/Managers/InGameMouseHandler.cs index 03bb9fd6..b4c9ea17 100644 --- a/Assets/Scripts/Managers/InGameMouseHandler.cs +++ b/Assets/Scripts/Managers/InGameMouseHandler.cs @@ -51,7 +51,10 @@ public class InGameMouseHandler : UnityEngine.Object public void Update() { - + if (GameManager.Instance.Input.PlayerAction.CancelClick.WasPressedThisFrame()) + { + GameManager.Instance.UI.ClosePopupMenu(); + } if (GameManager.Instance.Input.PlayerAction.PointClick.WasPressedThisFrame()) { ClickToMove(!EventSystem.current.IsPointerOverGameObject()); diff --git a/Assets/Scripts/Managers/InputSystem/InputActions.cs b/Assets/Scripts/Managers/InputSystem/InputActions.cs index 1d3f6b9d..bafbf2a9 100644 --- a/Assets/Scripts/Managers/InputSystem/InputActions.cs +++ b/Assets/Scripts/Managers/InputSystem/InputActions.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // 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"": ""/rightButton"", + ""interactions"": """", + ""processors"": """", + ""groups"": """", + ""action"": ""CancelClick"", + ""isComposite"": false, + ""isPartOfComposite"": false + }, + { + ""name"": """", + ""id"": ""2c0753e9-8ef2-43b1-893f-d360ac7a34d3"", + ""path"": ""/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"": ""/scroll"", + ""id"": ""1a09948a-e3d8-4dc0-a257-95fa88786135"", + ""path"": ""/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"": ""/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 m_PlayerActionsCallbackInterfaces = new List(); 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 m_UIActionsCallbackInterfaces = new List(); + 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); + } } diff --git a/Assets/Scripts/Managers/InputSystem/InputActions.inputactions b/Assets/Scripts/Managers/InputSystem/InputActions.inputactions index fc8c8499..21b147b6 100644 --- a/Assets/Scripts/Managers/InputSystem/InputActions.inputactions +++ b/Assets/Scripts/Managers/InputSystem/InputActions.inputactions @@ -9,6 +9,15 @@ "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": "", @@ -37,6 +46,28 @@ "action": "PointClick", "isComposite": false, "isPartOfComposite": false + }, + { + "name": "", + "id": "f43a2e12-ac25-49ce-95aa-43fd4e3754b2", + "path": "/rightButton", + "interactions": "", + "processors": "", + "groups": "", + "action": "CancelClick", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "2c0753e9-8ef2-43b1-893f-d360ac7a34d3", + "path": "/buttonWest", + "interactions": "", + "processors": "", + "groups": "", + "action": "CancelClick", + "isComposite": false, + "isPartOfComposite": false } ] }, @@ -66,7 +97,7 @@ "name": "Zoom", "type": "Value", "id": "41d86dbc-39e0-4655-bc19-0eab9d5014a6", - "expectedControlType": "Vector2", + "expectedControlType": "", "processors": "", "interactions": "", "initialStateCheck": true @@ -284,16 +315,44 @@ }, { "name": "", - "id": "8e2aefc6-bf10-4653-8782-6b92d5efc35a", - "path": "/scroll", + "id": "1a09948a-e3d8-4dc0-a257-95fa88786135", + "path": "/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": "/leftButton", + "interactions": "", + "processors": "", + "groups": "", + "action": "Click", + "isComposite": false, + "isPartOfComposite": false + } + ] } ], "controlSchemes": [] diff --git a/Assets/Scripts/UIElements/RadialMenuItem.cs b/Assets/Scripts/UIElements/RadialMenuItem.cs index 58b1c21d..3973fdfa 100644 --- a/Assets/Scripts/UIElements/RadialMenuItem.cs +++ b/Assets/Scripts/UIElements/RadialMenuItem.cs @@ -11,13 +11,7 @@ public class RadialMenuItem : MonoBehaviour private Button _radialMenuItemPrefab; private Dictionary _actions; private UniTaskCompletionSource tcs = new UniTaskCompletionSource(); - //private float _buttonWidth; - - private void Start() - { - // _buttonWidth = _radialMenuItemPrefab.GetComponent().rect.width; - } - + public UniTask ShowButtons(Dictionary actions) { _actions = actions; @@ -30,7 +24,7 @@ public class RadialMenuItem : MonoBehaviour float posX = Mathf.Sin(theta); float posY = Mathf.Cos(theta); - button.transform.localPosition = new Vector3(posX, posY, 0) * 50f; + button.transform.localPosition = new Vector3(posX, posY, 0) * 100f; var textMeshPro = button.GetComponentInChildren(); if (textMeshPro != null) diff --git a/Assets/UI Toolkit/PanelSettings.asset b/Assets/UI Toolkit/PanelSettings.asset index 557f672e..78df661f 100644 --- a/Assets/UI Toolkit/PanelSettings.asset +++ b/Assets/UI Toolkit/PanelSettings.asset @@ -14,6 +14,7 @@ MonoBehaviour: m_EditorClassIdentifier: themeUss: {fileID: -4733365628477956816, guid: f115e35de40c8114eb273e5469a3c282, type: 3} + m_DisableNoThemeWarning: 0 m_TargetTexture: {fileID: 0} m_RenderMode: 0 m_WorldSpaceLayer: 0 @@ -41,4 +42,6 @@ MonoBehaviour: m_AtlasBlitShader: {fileID: 9101, guid: 0000000000000000f000000000000000, type: 0} m_RuntimeShader: {fileID: 9100, guid: 0000000000000000f000000000000000, type: 0} m_RuntimeWorldShader: {fileID: 9102, guid: 0000000000000000f000000000000000, type: 0} + m_ICUDataAsset: {fileID: 0} + forceGammaRendering: 0 textSettings: {fileID: 0} diff --git a/Assets/UniversalRenderPipelineGlobalSettings.asset b/Assets/UniversalRenderPipelineGlobalSettings.asset index 5f1a5662..09aa0d67 100644 --- a/Assets/UniversalRenderPipelineGlobalSettings.asset +++ b/Assets/UniversalRenderPipelineGlobalSettings.asset @@ -99,6 +99,8 @@ MonoBehaviour: type: 3} m_xrMirrorViewPS: {fileID: 4800000, guid: d5a307c014552314b9f560906d708772, type: 3} + m_xrMotionVector: {fileID: 4800000, guid: f89aac1e4f84468418fe30e611dff395, + type: 3} - rid: 203675076144922628 type: {class: UniversalRendererResources, ns: UnityEngine.Rendering.Universal, asm: Unity.RenderPipelines.Universal.Runtime} @@ -128,8 +130,7 @@ MonoBehaviour: type: 3} m_FallOffLookup: {fileID: 2800000, guid: 5688ab254e4c0634f8d6c8e0792331ca, type: 3} - m_DefaultCustomMaterial: {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, - type: 2} + m_CopyDepthPS: {fileID: 4800000, guid: d6dae50ee9e1bfa4db75f19f99355220, type: 3} m_DefaultLitMaterial: {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, type: 2} m_DefaultUnlitMaterial: {fileID: 2100000, guid: 9dfc825aed78fcd4ba02077103263b40, @@ -259,13 +260,17 @@ MonoBehaviour: type: 3} voxelizeSceneShader: {fileID: 4800000, guid: c8b6a681c7b4e2e4785ffab093907f9e, type: 3} - traceVirtualOffsetCS: {fileID: 7200000, guid: 805f10d263aac4b4098c0279cd37a4f3, + traceVirtualOffsetCS: {fileID: -6772857160820960102, guid: ff2cbab5da58bf04d82c5f34037ed123, type: 3} - traceVirtualOffsetRT: {fileID: 4807578003741378534, guid: b60511f4aa1443f4d8c0b18f4fec92f4, + traceVirtualOffsetRT: {fileID: -5126288278712620388, guid: ff2cbab5da58bf04d82c5f34037ed123, type: 3} - skyOcclusionCS: {fileID: 7200000, guid: 798f52ec82fa04048a12826bbbbcf7b4, + skyOcclusionCS: {fileID: -6772857160820960102, guid: 5a2a534753fbdb44e96c3c78b5a6999d, type: 3} - skyOcclusionRT: {fileID: 4807578003741378534, guid: dfaf42b38dd001f49a72d8102b709f29, + skyOcclusionRT: {fileID: -5126288278712620388, guid: 5a2a534753fbdb44e96c3c78b5a6999d, + type: 3} + renderingLayerCS: {fileID: -6772857160820960102, guid: 94a070d33e408384bafc1dea4a565df9, + type: 3} + renderingLayerRT: {fileID: -5126288278712620388, guid: 94a070d33e408384bafc1dea4a565df9, type: 3} - rid: 203675076144922640 type: {class: ProbeVolumeGlobalSettings, ns: UnityEngine.Rendering, asm: Unity.RenderPipelines.Core.Runtime} diff --git a/Packages/manifest.json b/Packages/manifest.json index 924da39c..dc2229cb 100644 --- a/Packages/manifest.json +++ b/Packages/manifest.json @@ -1,18 +1,19 @@ { "dependencies": { "com.cysharp.unitask": "https://github.com/Cysharp/UniTask.git?path=src/UniTask/Assets/Plugins/UniTask", - "com.unity.ai.navigation": "2.0.0", + "com.unity.ai.navigation": "2.0.5", "com.unity.animation.rigging": "1.3.0", - "com.unity.cinemachine": "2.10.0", - "com.unity.collab-proxy": "2.3.1", - "com.unity.formats.fbx": "5.1.1", + "com.unity.cinemachine": "3.1.2", + "com.unity.collab-proxy": "2.5.2", + "com.unity.formats.fbx": "5.1.2", "com.unity.ide.visualstudio": "2.0.22", - "com.unity.inputsystem": "1.8.2", + "com.unity.inputsystem": "1.11.2", + "com.unity.multiplayer.center": "1.0.0", "com.unity.render-pipelines.universal": "17.0.3", - "com.unity.test-framework": "1.4.3", - "com.unity.timeline": "1.8.6", + "com.unity.test-framework": "1.4.5", + "com.unity.timeline": "1.8.7", "com.unity.ugui": "2.0.0", - "com.unity.visualscripting": "1.9.4", + "com.unity.visualscripting": "1.9.5", "com.unity.modules.accessibility": "1.0.0", "com.unity.modules.ai": "1.0.0", "com.unity.modules.androidjni": "1.0.0", diff --git a/Packages/packages-lock.json b/Packages/packages-lock.json index 1168d289..8f199ed0 100644 --- a/Packages/packages-lock.json +++ b/Packages/packages-lock.json @@ -15,7 +15,7 @@ "hash": "5cc97c7f0085624b6ef57853d70b404440060cef" }, "com.unity.ai.navigation": { - "version": "2.0.0", + "version": "2.0.5", "depth": 0, "source": "registry", "dependencies": { @@ -34,7 +34,7 @@ "url": "https://packages.unity.com" }, "com.unity.burst": { - "version": "1.8.13", + "version": "1.8.18", "depth": 1, "source": "registry", "dependencies": { @@ -44,29 +44,30 @@ "url": "https://packages.unity.com" }, "com.unity.cinemachine": { - "version": "2.10.0", + "version": "3.1.2", "depth": 0, "source": "registry", "dependencies": { - "com.unity.test-framework": "1.1.31" + "com.unity.splines": "2.0.0" }, "url": "https://packages.unity.com" }, "com.unity.collab-proxy": { - "version": "2.3.1", + "version": "2.5.2", "depth": 0, "source": "registry", "dependencies": {}, "url": "https://packages.unity.com" }, "com.unity.collections": { - "version": "1.4.0", - "depth": 3, + "version": "2.5.1", + "depth": 2, "source": "registry", "dependencies": { - "com.unity.burst": "1.6.6", + "com.unity.burst": "1.8.17", + "com.unity.test-framework": "1.4.5", "com.unity.nuget.mono-cecil": "1.11.4", - "com.unity.test-framework": "1.1.31" + "com.unity.test-framework.performance": "3.0.3" }, "url": "https://packages.unity.com" }, @@ -78,12 +79,12 @@ "url": "https://packages.unity.com" }, "com.unity.formats.fbx": { - "version": "5.1.1", + "version": "5.1.2", "depth": 0, "source": "registry", "dependencies": { - "com.unity.timeline": "1.7.1", - "com.autodesk.fbx": "5.1.1" + "com.autodesk.fbx": "5.1.1", + "com.unity.timeline": "1.7.1" }, "url": "https://packages.unity.com" }, @@ -97,7 +98,7 @@ "url": "https://packages.unity.com" }, "com.unity.inputsystem": { - "version": "1.8.2", + "version": "1.11.2", "depth": 0, "source": "registry", "dependencies": { @@ -106,30 +107,40 @@ "url": "https://packages.unity.com" }, "com.unity.mathematics": { - "version": "1.2.6", - "depth": 1, + "version": "1.3.2", + "depth": 2, "source": "registry", "dependencies": {}, "url": "https://packages.unity.com" }, + "com.unity.multiplayer.center": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": { + "com.unity.modules.uielements": "1.0.0" + } + }, "com.unity.nuget.mono-cecil": { "version": "1.11.4", - "depth": 4, + "depth": 3, "source": "registry", "dependencies": {}, "url": "https://packages.unity.com" }, "com.unity.render-pipelines.core": { - "version": "16.0.6", + "version": "17.0.3", "depth": 1, "source": "builtin", "dependencies": { - "com.unity.mathematics": "1.2.4", + "com.unity.burst": "1.8.14", + "com.unity.mathematics": "1.3.2", "com.unity.ugui": "2.0.0", + "com.unity.collections": "2.4.3", "com.unity.modules.physics": "1.0.0", "com.unity.modules.terrain": "1.0.0", "com.unity.modules.jsonserialize": "1.0.0", - "com.unity.rendering.light-transport": "1.0.0" + "com.unity.rendering.light-transport": "1.0.1" } }, "com.unity.render-pipelines.universal": { @@ -137,20 +148,27 @@ "depth": 0, "source": "builtin", "dependencies": { - "com.unity.mathematics": "1.2.1", - "com.unity.burst": "1.8.9", - "com.unity.render-pipelines.core": "16.0.6", - "com.unity.shadergraph": "16.0.6" + "com.unity.render-pipelines.core": "17.0.3", + "com.unity.shadergraph": "17.0.3", + "com.unity.render-pipelines.universal-config": "17.0.3" + } + }, + "com.unity.render-pipelines.universal-config": { + "version": "17.0.3", + "depth": 1, + "source": "builtin", + "dependencies": { + "com.unity.render-pipelines.core": "17.0.3" } }, "com.unity.rendering.light-transport": { - "version": "1.0.2", + "version": "1.0.1", "depth": 2, "source": "builtin", "dependencies": { - "com.unity.collections": "1.4.0", + "com.unity.collections": "2.2.0", "com.unity.mathematics": "1.2.4", - "com.unity.render-pipelines.core": "16.0.1" + "com.unity.modules.terrain": "1.0.0" } }, "com.unity.searcher": { @@ -160,17 +178,35 @@ "dependencies": {}, "url": "https://packages.unity.com" }, + "com.unity.settings-manager": { + "version": "2.0.1", + "depth": 2, + "source": "registry", + "dependencies": {}, + "url": "https://packages.unity.com" + }, "com.unity.shadergraph": { - "version": "16.0.6", + "version": "17.0.3", "depth": 1, "source": "builtin", "dependencies": { - "com.unity.render-pipelines.core": "16.0.6", + "com.unity.render-pipelines.core": "17.0.3", "com.unity.searcher": "4.9.2" } }, + "com.unity.splines": { + "version": "2.6.1", + "depth": 1, + "source": "registry", + "dependencies": { + "com.unity.ugui": "1.0.0", + "com.unity.mathematics": "1.2.1", + "com.unity.settings-manager": "1.0.3" + }, + "url": "https://packages.unity.com" + }, "com.unity.test-framework": { - "version": "1.4.3", + "version": "1.4.5", "depth": 0, "source": "registry", "dependencies": { @@ -180,14 +216,24 @@ }, "url": "https://packages.unity.com" }, + "com.unity.test-framework.performance": { + "version": "3.0.3", + "depth": 3, + "source": "registry", + "dependencies": { + "com.unity.test-framework": "1.1.31", + "com.unity.modules.jsonserialize": "1.0.0" + }, + "url": "https://packages.unity.com" + }, "com.unity.timeline": { - "version": "1.8.6", + "version": "1.8.7", "depth": 0, "source": "registry", "dependencies": { + "com.unity.modules.audio": "1.0.0", "com.unity.modules.director": "1.0.0", "com.unity.modules.animation": "1.0.0", - "com.unity.modules.audio": "1.0.0", "com.unity.modules.particlesystem": "1.0.0" }, "url": "https://packages.unity.com" @@ -202,7 +248,7 @@ } }, "com.unity.visualscripting": { - "version": "1.9.4", + "version": "1.9.5", "depth": 0, "source": "registry", "dependencies": { diff --git a/ProjectSettings/EditorBuildSettings.asset b/ProjectSettings/EditorBuildSettings.asset index 053f3a93..6d5c7f60 100644 --- a/ProjectSettings/EditorBuildSettings.asset +++ b/ProjectSettings/EditorBuildSettings.asset @@ -23,5 +23,9 @@ EditorBuildSettings: - enabled: 1 path: Assets/Scenes/JobAgency.unity guid: def11a333084d3942be57ae918949239 - m_configObjects: {} + m_configObjects: + com.unity.input.settings: {fileID: 11400000, guid: 26c97fb797b6ccd4db2408be213f101d, + type: 2} + com.unity.input.settings.actions: {fileID: -944628639613478452, guid: 728db966a1cb6454eb419e9cc8cfaf70, + type: 3} m_UseUCBPForAssetBundles: 0 diff --git a/ProjectSettings/ProjectVersion.txt b/ProjectSettings/ProjectVersion.txt index 2ffa4518..11b73a4b 100644 --- a/ProjectSettings/ProjectVersion.txt +++ b/ProjectSettings/ProjectVersion.txt @@ -1,2 +1,2 @@ -m_EditorVersion: 2023.2.20f1 -m_EditorVersionWithRevision: 2023.2.20f1 (0e25a174756c) +m_EditorVersion: 6000.0.23f1 +m_EditorVersionWithRevision: 6000.0.23f1 (1c4764c07fb4) diff --git a/ProjectSettings/ShaderGraphSettings.asset b/ProjectSettings/ShaderGraphSettings.asset index 9b28428b..0beb39ac 100644 --- a/ProjectSettings/ShaderGraphSettings.asset +++ b/ProjectSettings/ShaderGraphSettings.asset @@ -12,5 +12,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: de02f9e1d18f588468e474319d09a723, type: 3} m_Name: m_EditorClassIdentifier: + shaderVariantLimit: 2048 customInterpolatorErrorThreshold: 32 customInterpolatorWarningThreshold: 16 + customHeatmapValues: {fileID: 0}