diff --git a/Assets/Cars/AE86/86.prefab b/Assets/Cars/AE86/86.prefab index 79b4caa..3000ebf 100644 --- a/Assets/Cars/AE86/86.prefab +++ b/Assets/Cars/AE86/86.prefab @@ -187,7 +187,7 @@ GameObject: - component: {fileID: 2658126405065944351} - component: {fileID: 3919563610228570404} m_Layer: 0 - m_Name: RightRear + m_Name: RearRight m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -587,6 +587,7 @@ WheelCollider: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 5511142887409963698} + serializedVersion: 2 m_Center: {x: 0, y: 0, z: 0} m_Radius: 0.66 m_SuspensionSpring: @@ -609,7 +610,15 @@ WheelCollider: m_AsymptoteSlip: 0.5 m_AsymptoteValue: 0.75 m_Stiffness: 1 + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 m_Enabled: 1 + m_ProvidesContacts: 0 --- !u!1 &6197753408674948659 GameObject: m_ObjectHideFlags: 0 @@ -741,10 +750,21 @@ Rigidbody: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 6635559819384152539} - serializedVersion: 2 + serializedVersion: 4 m_Mass: 1000 m_Drag: 0 m_AngularDrag: 0.05 + m_CenterOfMass: {x: 0, y: 0, z: 0} + m_InertiaTensor: {x: 1, y: 1, z: 1} + m_InertiaRotation: {x: 0, y: 0, z: 0, w: 1} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ImplicitCom: 1 + m_ImplicitTensor: 1 m_UseGravity: 1 m_IsKinematic: 0 m_Interpolate: 0 @@ -758,9 +778,17 @@ BoxCollider: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 6635559819384152539} m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 m_IsTrigger: 0 + m_ProvidesContacts: 0 m_Enabled: 1 - serializedVersion: 2 + serializedVersion: 3 m_Size: {x: 3.8350902, y: 2.5088034, z: 9.797295} m_Center: {x: -0.054754972, y: 0.7544017, z: -0.34678173} --- !u!114 &7484181368601986816 @@ -775,16 +803,28 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: d4961da06d90aa141a3f8753f8273d1b, type: 3} m_Name: m_EditorClassIdentifier: - frontRightWheelCollider: {fileID: 3709301375758161893} - frontLeftWheelCollider: {fileID: 7197399277290813424} - rearRightWheelCollider: {fileID: 6716099154789843407} - rearLeftWheelCollider: {fileID: 8756131927912224202} - frontRightWheel: {fileID: 8603147080505033577} - frontLeftWheel: {fileID: 5406544531487247495} - rearRightWheel: {fileID: 9144114124687175875} - rearLeftWheel: {fileID: 3254342925887961269} - acceleration: 500 - breakingForce: 300 + frontRightWheel: + collider: {fileID: 3709301375758161893} + wheel: {fileID: 8603147080505033577} + wheelSize: 16 + frontLeftWheel: + collider: {fileID: 7197399277290813424} + wheel: {fileID: 5406544531487247495} + wheelSize: 16 + rearRightWheel: + collider: {fileID: 6716099154789843407} + wheel: {fileID: 9144114124687175875} + wheelSize: 16 + rearLeftWheel: + collider: {fileID: 8756131927912224202} + wheel: {fileID: 3254342925887961269} + wheelSize: 16 + flRpmLabel: {fileID: 0} + frRpmLabel: {fileID: 0} + rlRpmLabel: {fileID: 0} + rrRpmLabel: {fileID: 0} + acceleration: 1000 + breakingForce: 1000 maxTurnAngle: 45 --- !u!1 &7192189071031128551 GameObject: @@ -825,6 +865,7 @@ WheelCollider: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 7192189071031128551} + serializedVersion: 2 m_Center: {x: 0, y: 0, z: 0} m_Radius: 0.66 m_SuspensionSpring: @@ -847,7 +888,15 @@ WheelCollider: m_AsymptoteSlip: 0.5 m_AsymptoteValue: 0.75 m_Stiffness: 1 + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 m_Enabled: 1 + m_ProvidesContacts: 0 --- !u!1 &8362515007327840337 GameObject: m_ObjectHideFlags: 0 @@ -922,6 +971,7 @@ WheelCollider: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 8372165502191654333} + serializedVersion: 2 m_Center: {x: 0, y: 0, z: 0} m_Radius: 0.66 m_SuspensionSpring: @@ -944,7 +994,15 @@ WheelCollider: m_AsymptoteSlip: 0.5 m_AsymptoteValue: 0.75 m_Stiffness: 1 + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 m_Enabled: 1 + m_ProvidesContacts: 0 --- !u!1 &8701444454671332249 GameObject: m_ObjectHideFlags: 0 @@ -984,6 +1042,7 @@ WheelCollider: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 8701444454671332249} + serializedVersion: 2 m_Center: {x: 0, y: 0, z: 0} m_Radius: 0.66 m_SuspensionSpring: @@ -1006,7 +1065,15 @@ WheelCollider: m_AsymptoteSlip: 0.5 m_AsymptoteValue: 0.75 m_Stiffness: 1 + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 m_Enabled: 1 + m_ProvidesContacts: 0 --- !u!1 &8716395517054482359 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Cars/AE86/Materials/Grey.mat b/Assets/Cars/AE86/Materials/Grey.mat index f4cf2ea..23bd660 100644 --- a/Assets/Cars/AE86/Materials/Grey.mat +++ b/Assets/Cars/AE86/Materials/Grey.mat @@ -9,6 +9,8 @@ Material: m_PrefabAsset: {fileID: 0} m_Name: Grey m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 m_ValidKeywords: [] m_InvalidKeywords: [] m_LightmapFlags: 4 @@ -18,6 +20,7 @@ Material: stringTagMap: RenderType: Opaque disabledShaderPasses: [] + m_LockedProperties: m_SavedProperties: serializedVersion: 3 m_TexEnvs: @@ -123,4 +126,4 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} m_Name: m_EditorClassIdentifier: - version: 5 + version: 7 diff --git a/Assets/Cars/AE86/Materials/Orange.mat b/Assets/Cars/AE86/Materials/Orange.mat index e690c41..593cf74 100644 --- a/Assets/Cars/AE86/Materials/Orange.mat +++ b/Assets/Cars/AE86/Materials/Orange.mat @@ -9,6 +9,8 @@ Material: m_PrefabAsset: {fileID: 0} m_Name: Orange m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 m_ValidKeywords: [] m_InvalidKeywords: [] m_LightmapFlags: 4 @@ -18,6 +20,7 @@ Material: stringTagMap: RenderType: Opaque disabledShaderPasses: [] + m_LockedProperties: m_SavedProperties: serializedVersion: 3 m_TexEnvs: @@ -123,4 +126,4 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} m_Name: m_EditorClassIdentifier: - version: 5 + version: 7 diff --git a/Assets/Cars/AE86/Materials/Red.mat b/Assets/Cars/AE86/Materials/Red.mat index a38ecdb..e5f0c3c 100644 --- a/Assets/Cars/AE86/Materials/Red.mat +++ b/Assets/Cars/AE86/Materials/Red.mat @@ -12,7 +12,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} m_Name: m_EditorClassIdentifier: - version: 5 + version: 7 --- !u!21 &2100000 Material: serializedVersion: 8 @@ -22,6 +22,8 @@ Material: m_PrefabAsset: {fileID: 0} m_Name: Red m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 m_ValidKeywords: [] m_InvalidKeywords: [] m_LightmapFlags: 4 @@ -31,6 +33,7 @@ Material: stringTagMap: RenderType: Opaque disabledShaderPasses: [] + m_LockedProperties: m_SavedProperties: serializedVersion: 3 m_TexEnvs: diff --git a/Assets/Cars/AE86/Materials/Window.mat b/Assets/Cars/AE86/Materials/Window.mat index fb23f0b..dde3edb 100644 --- a/Assets/Cars/AE86/Materials/Window.mat +++ b/Assets/Cars/AE86/Materials/Window.mat @@ -9,6 +9,8 @@ Material: m_PrefabAsset: {fileID: 0} m_Name: Window m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 m_ValidKeywords: [] m_InvalidKeywords: [] m_LightmapFlags: 4 @@ -18,6 +20,7 @@ Material: stringTagMap: RenderType: Opaque disabledShaderPasses: [] + m_LockedProperties: m_SavedProperties: serializedVersion: 3 m_TexEnvs: @@ -123,4 +126,4 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} m_Name: m_EditorClassIdentifier: - version: 5 + version: 7 diff --git a/Assets/Cars/AE86/Materials/black.mat b/Assets/Cars/AE86/Materials/black.mat index 30f996f..5475e88 100644 --- a/Assets/Cars/AE86/Materials/black.mat +++ b/Assets/Cars/AE86/Materials/black.mat @@ -9,6 +9,8 @@ Material: m_PrefabAsset: {fileID: 0} m_Name: black m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 m_ValidKeywords: [] m_InvalidKeywords: [] m_LightmapFlags: 4 @@ -18,6 +20,7 @@ Material: stringTagMap: RenderType: Opaque disabledShaderPasses: [] + m_LockedProperties: m_SavedProperties: serializedVersion: 3 m_TexEnvs: @@ -123,4 +126,4 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} m_Name: m_EditorClassIdentifier: - version: 5 + version: 7 diff --git a/Assets/Cars/AE86/Materials/tofu_shop.mat b/Assets/Cars/AE86/Materials/tofu_shop.mat index 0f4776d..b13ca6f 100644 --- a/Assets/Cars/AE86/Materials/tofu_shop.mat +++ b/Assets/Cars/AE86/Materials/tofu_shop.mat @@ -12,7 +12,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} m_Name: m_EditorClassIdentifier: - version: 5 + version: 7 --- !u!21 &2100000 Material: serializedVersion: 8 @@ -22,6 +22,8 @@ Material: m_PrefabAsset: {fileID: 0} m_Name: tofu_shop m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 m_ValidKeywords: [] m_InvalidKeywords: [] m_LightmapFlags: 4 @@ -31,6 +33,7 @@ Material: stringTagMap: RenderType: Opaque disabledShaderPasses: [] + m_LockedProperties: m_SavedProperties: serializedVersion: 3 m_TexEnvs: diff --git a/Assets/Cars/AE86/Materials/white.mat b/Assets/Cars/AE86/Materials/white.mat index 14935eb..0cba724 100644 --- a/Assets/Cars/AE86/Materials/white.mat +++ b/Assets/Cars/AE86/Materials/white.mat @@ -9,6 +9,8 @@ Material: m_PrefabAsset: {fileID: 0} m_Name: white m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 m_ValidKeywords: [] m_InvalidKeywords: [] m_LightmapFlags: 4 @@ -18,6 +20,7 @@ Material: stringTagMap: RenderType: Opaque disabledShaderPasses: [] + m_LockedProperties: m_SavedProperties: serializedVersion: 3 m_TexEnvs: @@ -123,4 +126,4 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} m_Name: m_EditorClassIdentifier: - version: 5 + version: 7 diff --git a/Assets/Cars/R34/Materials/tire.mat b/Assets/Cars/R34/Materials/tire.mat index b9ed5ab..83535a3 100644 --- a/Assets/Cars/R34/Materials/tire.mat +++ b/Assets/Cars/R34/Materials/tire.mat @@ -12,7 +12,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} m_Name: m_EditorClassIdentifier: - version: 5 + version: 7 --- !u!21 &2100000 Material: serializedVersion: 8 @@ -22,6 +22,8 @@ Material: m_PrefabAsset: {fileID: 0} m_Name: tire m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 m_ValidKeywords: [] m_InvalidKeywords: [] m_LightmapFlags: 4 @@ -31,6 +33,7 @@ Material: stringTagMap: RenderType: Opaque disabledShaderPasses: [] + m_LockedProperties: m_SavedProperties: serializedVersion: 3 m_TexEnvs: diff --git a/Assets/Input.meta b/Assets/Input.meta new file mode 100644 index 0000000..af3be25 --- /dev/null +++ b/Assets/Input.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: fdef42b5728717d48a6256dc65ac1103 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Input/InputMaster.cs b/Assets/Input/InputMaster.cs new file mode 100644 index 0000000..497fcae --- /dev/null +++ b/Assets/Input/InputMaster.cs @@ -0,0 +1,394 @@ +//------------------------------------------------------------------------------ +// +// This code was auto-generated by com.unity.inputsystem:InputActionCodeGenerator +// version 1.6.1 +// from Assets/Input/InputMaster.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; + +public partial class @InputMaster: IInputActionCollection2, IDisposable +{ + public InputActionAsset asset { get; } + public @InputMaster() + { + asset = InputActionAsset.FromJson(@"{ + ""name"": ""InputMaster"", + ""maps"": [ + { + ""name"": ""Car"", + ""id"": ""279efb2e-a9ae-40e7-af18-b556d8e58b59"", + ""actions"": [ + { + ""name"": ""Movement"", + ""type"": ""Button"", + ""id"": ""30aae96b-847c-40a0-aff6-3f1951d55ca3"", + ""expectedControlType"": ""Button"", + ""processors"": """", + ""interactions"": """", + ""initialStateCheck"": false + }, + { + ""name"": ""Turn"", + ""type"": ""Button"", + ""id"": ""0be415b5-08e4-453d-9e28-fb9b7eff7e38"", + ""expectedControlType"": ""Button"", + ""processors"": """", + ""interactions"": """", + ""initialStateCheck"": false + }, + { + ""name"": ""Brake"", + ""type"": ""Button"", + ""id"": ""190563e6-0fc1-4263-9f0e-919667264461"", + ""expectedControlType"": ""Button"", + ""processors"": """", + ""interactions"": """", + ""initialStateCheck"": false + } + ], + ""bindings"": [ + { + ""name"": ""Z"", + ""id"": ""8c181f14-d941-40de-b32a-0d2bd55fa6f8"", + ""path"": ""1DAxis"", + ""interactions"": """", + ""processors"": """", + ""groups"": """", + ""action"": ""Movement"", + ""isComposite"": true, + ""isPartOfComposite"": false + }, + { + ""name"": ""negative"", + ""id"": ""93df6b39-9305-4203-bd02-1528711041d5"", + ""path"": ""/leftTrigger"", + ""interactions"": """", + ""processors"": """", + ""groups"": ""Gamepad"", + ""action"": ""Movement"", + ""isComposite"": false, + ""isPartOfComposite"": true + }, + { + ""name"": ""positive"", + ""id"": ""74248671-ae82-4fb8-9b1e-7c716d7a918a"", + ""path"": ""/rightTrigger"", + ""interactions"": """", + ""processors"": """", + ""groups"": ""Gamepad"", + ""action"": ""Movement"", + ""isComposite"": false, + ""isPartOfComposite"": true + }, + { + ""name"": ""Z"", + ""id"": ""3f962054-2147-4969-a731-b2aed5c280d2"", + ""path"": ""1DAxis"", + ""interactions"": """", + ""processors"": """", + ""groups"": """", + ""action"": ""Movement"", + ""isComposite"": true, + ""isPartOfComposite"": false + }, + { + ""name"": ""negative"", + ""id"": ""5806e9c3-6fff-4468-9777-fa799e5356cd"", + ""path"": ""/downArrow"", + ""interactions"": """", + ""processors"": """", + ""groups"": ""Keyboard"", + ""action"": ""Movement"", + ""isComposite"": false, + ""isPartOfComposite"": true + }, + { + ""name"": ""positive"", + ""id"": ""bd366aea-6bef-4aa2-8ec9-98e0564017a2"", + ""path"": ""/upArrow"", + ""interactions"": """", + ""processors"": """", + ""groups"": ""Keyboard"", + ""action"": ""Movement"", + ""isComposite"": false, + ""isPartOfComposite"": true + }, + { + ""name"": ""X"", + ""id"": ""449c5b18-ec83-4072-813e-bebae2c84785"", + ""path"": ""1DAxis"", + ""interactions"": """", + ""processors"": """", + ""groups"": """", + ""action"": ""Turn"", + ""isComposite"": true, + ""isPartOfComposite"": false + }, + { + ""name"": ""negative"", + ""id"": ""dd9f85b5-dd05-49f4-a0be-22d4e0f1d9fc"", + ""path"": ""/leftStick/left"", + ""interactions"": """", + ""processors"": """", + ""groups"": ""Gamepad"", + ""action"": ""Turn"", + ""isComposite"": false, + ""isPartOfComposite"": true + }, + { + ""name"": ""positive"", + ""id"": ""aa7bd576-99ff-4b74-b023-f25395d6ad9e"", + ""path"": ""/leftStick/right"", + ""interactions"": """", + ""processors"": """", + ""groups"": ""Gamepad"", + ""action"": ""Turn"", + ""isComposite"": false, + ""isPartOfComposite"": true + }, + { + ""name"": ""X"", + ""id"": ""b0942bad-1a51-4bd7-9fce-a0d408272cc8"", + ""path"": ""1DAxis"", + ""interactions"": """", + ""processors"": """", + ""groups"": """", + ""action"": ""Turn"", + ""isComposite"": true, + ""isPartOfComposite"": false + }, + { + ""name"": ""negative"", + ""id"": ""72cf4953-8c6b-4bce-8216-9b994421aef2"", + ""path"": ""/leftArrow"", + ""interactions"": """", + ""processors"": """", + ""groups"": ""Keyboard"", + ""action"": ""Turn"", + ""isComposite"": false, + ""isPartOfComposite"": true + }, + { + ""name"": ""positive"", + ""id"": ""5532b214-24f7-4e1e-aa5f-b9e20c7b0ae4"", + ""path"": ""/rightArrow"", + ""interactions"": """", + ""processors"": """", + ""groups"": ""Keyboard"", + ""action"": ""Turn"", + ""isComposite"": false, + ""isPartOfComposite"": true + }, + { + ""name"": """", + ""id"": ""5bd100b8-204f-41d9-8870-2df4129bb4c3"", + ""path"": ""/space"", + ""interactions"": """", + ""processors"": """", + ""groups"": ""Keyboard"", + ""action"": ""Brake"", + ""isComposite"": false, + ""isPartOfComposite"": false + }, + { + ""name"": """", + ""id"": ""1759b642-aa43-4fa3-a5d2-ab4356b087a6"", + ""path"": ""/buttonEast"", + ""interactions"": """", + ""processors"": """", + ""groups"": ""Gamepad"", + ""action"": ""Brake"", + ""isComposite"": false, + ""isPartOfComposite"": false + } + ] + } + ], + ""controlSchemes"": [ + { + ""name"": ""Gamepad"", + ""bindingGroup"": ""Gamepad"", + ""devices"": [ + { + ""devicePath"": """", + ""isOptional"": false, + ""isOR"": false + }, + { + ""devicePath"": """", + ""isOptional"": false, + ""isOR"": false + } + ] + }, + { + ""name"": ""Keyboard"", + ""bindingGroup"": ""Keyboard"", + ""devices"": [ + { + ""devicePath"": """", + ""isOptional"": false, + ""isOR"": false + } + ] + } + ] +}"); + // Car + m_Car = asset.FindActionMap("Car", throwIfNotFound: true); + m_Car_Movement = m_Car.FindAction("Movement", throwIfNotFound: true); + m_Car_Turn = m_Car.FindAction("Turn", throwIfNotFound: true); + m_Car_Brake = m_Car.FindAction("Brake", throwIfNotFound: true); + } + + 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); + } + + // Car + private readonly InputActionMap m_Car; + private List m_CarActionsCallbackInterfaces = new List(); + private readonly InputAction m_Car_Movement; + private readonly InputAction m_Car_Turn; + private readonly InputAction m_Car_Brake; + public struct CarActions + { + private @InputMaster m_Wrapper; + public CarActions(@InputMaster wrapper) { m_Wrapper = wrapper; } + public InputAction @Movement => m_Wrapper.m_Car_Movement; + public InputAction @Turn => m_Wrapper.m_Car_Turn; + public InputAction @Brake => m_Wrapper.m_Car_Brake; + public InputActionMap Get() { return m_Wrapper.m_Car; } + public void Enable() { Get().Enable(); } + public void Disable() { Get().Disable(); } + public bool enabled => Get().enabled; + public static implicit operator InputActionMap(CarActions set) { return set.Get(); } + public void AddCallbacks(ICarActions instance) + { + if (instance == null || m_Wrapper.m_CarActionsCallbackInterfaces.Contains(instance)) return; + m_Wrapper.m_CarActionsCallbackInterfaces.Add(instance); + @Movement.started += instance.OnMovement; + @Movement.performed += instance.OnMovement; + @Movement.canceled += instance.OnMovement; + @Turn.started += instance.OnTurn; + @Turn.performed += instance.OnTurn; + @Turn.canceled += instance.OnTurn; + @Brake.started += instance.OnBrake; + @Brake.performed += instance.OnBrake; + @Brake.canceled += instance.OnBrake; + } + + private void UnregisterCallbacks(ICarActions instance) + { + @Movement.started -= instance.OnMovement; + @Movement.performed -= instance.OnMovement; + @Movement.canceled -= instance.OnMovement; + @Turn.started -= instance.OnTurn; + @Turn.performed -= instance.OnTurn; + @Turn.canceled -= instance.OnTurn; + @Brake.started -= instance.OnBrake; + @Brake.performed -= instance.OnBrake; + @Brake.canceled -= instance.OnBrake; + } + + public void RemoveCallbacks(ICarActions instance) + { + if (m_Wrapper.m_CarActionsCallbackInterfaces.Remove(instance)) + UnregisterCallbacks(instance); + } + + public void SetCallbacks(ICarActions instance) + { + foreach (var item in m_Wrapper.m_CarActionsCallbackInterfaces) + UnregisterCallbacks(item); + m_Wrapper.m_CarActionsCallbackInterfaces.Clear(); + AddCallbacks(instance); + } + } + public CarActions @Car => new CarActions(this); + private int m_GamepadSchemeIndex = -1; + public InputControlScheme GamepadScheme + { + get + { + if (m_GamepadSchemeIndex == -1) m_GamepadSchemeIndex = asset.FindControlSchemeIndex("Gamepad"); + return asset.controlSchemes[m_GamepadSchemeIndex]; + } + } + private int m_KeyboardSchemeIndex = -1; + public InputControlScheme KeyboardScheme + { + get + { + if (m_KeyboardSchemeIndex == -1) m_KeyboardSchemeIndex = asset.FindControlSchemeIndex("Keyboard"); + return asset.controlSchemes[m_KeyboardSchemeIndex]; + } + } + public interface ICarActions + { + void OnMovement(InputAction.CallbackContext context); + void OnTurn(InputAction.CallbackContext context); + void OnBrake(InputAction.CallbackContext context); + } +} diff --git a/Assets/Input/InputMaster.cs.meta b/Assets/Input/InputMaster.cs.meta new file mode 100644 index 0000000..77d8518 --- /dev/null +++ b/Assets/Input/InputMaster.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d36508772a7fec945878014896f4e770 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Input/InputMaster.inputactions b/Assets/Input/InputMaster.inputactions new file mode 100644 index 0000000..f962b28 --- /dev/null +++ b/Assets/Input/InputMaster.inputactions @@ -0,0 +1,223 @@ +{ + "name": "InputMaster", + "maps": [ + { + "name": "Car", + "id": "279efb2e-a9ae-40e7-af18-b556d8e58b59", + "actions": [ + { + "name": "Movement", + "type": "Button", + "id": "30aae96b-847c-40a0-aff6-3f1951d55ca3", + "expectedControlType": "Button", + "processors": "", + "interactions": "", + "initialStateCheck": false + }, + { + "name": "Turn", + "type": "Button", + "id": "0be415b5-08e4-453d-9e28-fb9b7eff7e38", + "expectedControlType": "Button", + "processors": "", + "interactions": "", + "initialStateCheck": false + }, + { + "name": "Brake", + "type": "Button", + "id": "190563e6-0fc1-4263-9f0e-919667264461", + "expectedControlType": "Button", + "processors": "", + "interactions": "", + "initialStateCheck": false + } + ], + "bindings": [ + { + "name": "Z", + "id": "8c181f14-d941-40de-b32a-0d2bd55fa6f8", + "path": "1DAxis", + "interactions": "", + "processors": "", + "groups": "", + "action": "Movement", + "isComposite": true, + "isPartOfComposite": false + }, + { + "name": "negative", + "id": "93df6b39-9305-4203-bd02-1528711041d5", + "path": "/leftTrigger", + "interactions": "", + "processors": "", + "groups": "Gamepad", + "action": "Movement", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "positive", + "id": "74248671-ae82-4fb8-9b1e-7c716d7a918a", + "path": "/rightTrigger", + "interactions": "", + "processors": "", + "groups": "Gamepad", + "action": "Movement", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "Z", + "id": "3f962054-2147-4969-a731-b2aed5c280d2", + "path": "1DAxis", + "interactions": "", + "processors": "", + "groups": "", + "action": "Movement", + "isComposite": true, + "isPartOfComposite": false + }, + { + "name": "negative", + "id": "5806e9c3-6fff-4468-9777-fa799e5356cd", + "path": "/downArrow", + "interactions": "", + "processors": "", + "groups": "Keyboard", + "action": "Movement", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "positive", + "id": "bd366aea-6bef-4aa2-8ec9-98e0564017a2", + "path": "/upArrow", + "interactions": "", + "processors": "", + "groups": "Keyboard", + "action": "Movement", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "X", + "id": "449c5b18-ec83-4072-813e-bebae2c84785", + "path": "1DAxis", + "interactions": "", + "processors": "", + "groups": "", + "action": "Turn", + "isComposite": true, + "isPartOfComposite": false + }, + { + "name": "negative", + "id": "dd9f85b5-dd05-49f4-a0be-22d4e0f1d9fc", + "path": "/leftStick/left", + "interactions": "", + "processors": "", + "groups": "Gamepad", + "action": "Turn", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "positive", + "id": "aa7bd576-99ff-4b74-b023-f25395d6ad9e", + "path": "/leftStick/right", + "interactions": "", + "processors": "", + "groups": "Gamepad", + "action": "Turn", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "X", + "id": "b0942bad-1a51-4bd7-9fce-a0d408272cc8", + "path": "1DAxis", + "interactions": "", + "processors": "", + "groups": "", + "action": "Turn", + "isComposite": true, + "isPartOfComposite": false + }, + { + "name": "negative", + "id": "72cf4953-8c6b-4bce-8216-9b994421aef2", + "path": "/leftArrow", + "interactions": "", + "processors": "", + "groups": "Keyboard", + "action": "Turn", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "positive", + "id": "5532b214-24f7-4e1e-aa5f-b9e20c7b0ae4", + "path": "/rightArrow", + "interactions": "", + "processors": "", + "groups": "Keyboard", + "action": "Turn", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "", + "id": "5bd100b8-204f-41d9-8870-2df4129bb4c3", + "path": "/space", + "interactions": "", + "processors": "", + "groups": "Keyboard", + "action": "Brake", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "1759b642-aa43-4fa3-a5d2-ab4356b087a6", + "path": "/buttonEast", + "interactions": "", + "processors": "", + "groups": "Gamepad", + "action": "Brake", + "isComposite": false, + "isPartOfComposite": false + } + ] + } + ], + "controlSchemes": [ + { + "name": "Gamepad", + "bindingGroup": "Gamepad", + "devices": [ + { + "devicePath": "", + "isOptional": false, + "isOR": false + }, + { + "devicePath": "", + "isOptional": false, + "isOR": false + } + ] + }, + { + "name": "Keyboard", + "bindingGroup": "Keyboard", + "devices": [ + { + "devicePath": "", + "isOptional": false, + "isOR": false + } + ] + } + ] +} \ No newline at end of file diff --git a/Assets/Input/InputMaster.inputactions.meta b/Assets/Input/InputMaster.inputactions.meta new file mode 100644 index 0000000..86df93a --- /dev/null +++ b/Assets/Input/InputMaster.inputactions.meta @@ -0,0 +1,14 @@ +fileFormatVersion: 2 +guid: e37caa3d2c5ccb14aadbdc76b282b649 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 8404be70184654265930450def6a9037, type: 3} + generateWrapperCode: 1 + wrapperCodePath: + wrapperClassName: + wrapperCodeNamespace: diff --git a/Assets/Scenes/Test.unity b/Assets/Scenes/Test.unity index d2594e7..c4d4d3a 100644 --- a/Assets/Scenes/Test.unity +++ b/Assets/Scenes/Test.unity @@ -104,7 +104,7 @@ NavMeshSettings: serializedVersion: 2 m_ObjectHideFlags: 0 m_BuildSettings: - serializedVersion: 2 + serializedVersion: 3 agentTypeID: 0 agentRadius: 0.5 agentHeight: 2 @@ -117,7 +117,7 @@ NavMeshSettings: cellSize: 0.16666667 manualTileSize: 0 tileSize: 256 - accuratePlacement: 0 + buildHeightMesh: 0 maxJobWorkers: 0 preserveTilesOutsideBounds: 0 debug: @@ -445,6 +445,7 @@ GameObject: - component: {fileID: 330585547} - component: {fileID: 330585548} - component: {fileID: 330585549} + - component: {fileID: 330585550} m_Layer: 0 m_Name: Main Camera m_TagString: MainCamera @@ -474,9 +475,17 @@ Camera: m_projectionMatrixMode: 1 m_GateFitMode: 2 m_FOVAxisMode: 0 + m_Iso: 200 + m_ShutterSpeed: 0.005 + m_Aperture: 16 + m_FocusDistance: 10 + m_FocalLength: 50 + m_BladeCount: 5 + m_Curvature: {x: 2, y: 11} + m_BarrelClipping: 0.25 + m_Anamorphism: 0 m_SensorSize: {x: 36, y: 24} m_LensShift: {x: 0, y: 0} - m_FocalLength: 50 m_NormalizedViewPortRect: serializedVersion: 2 x: 0 @@ -510,7 +519,7 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 330585543} - m_LocalRotation: {x: 0.18910755, y: 0, z: 0, w: 0.9819564} + m_LocalRotation: {x: 0.18910752, y: 0, z: 0, w: 0.9819564} m_LocalPosition: {x: -1.3821344, y: 9.9834175, z: -20.275475} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 @@ -548,9 +557,20 @@ MonoBehaviour: m_Dithering: 0 m_ClearDepth: 1 m_AllowXRRendering: 1 + m_AllowHDROutput: 1 + m_UseScreenCoordOverride: 0 + m_ScreenSizeOverride: {x: 0, y: 0, z: 0, w: 0} + m_ScreenCoordScaleBias: {x: 0, y: 0, z: 0, w: 0} m_RequiresDepthTexture: 0 m_RequiresColorTexture: 0 m_Version: 2 + m_TaaSettings: + quality: 3 + frameInfluence: 0.1 + jitterScale: 1 + mipBias: 0 + varianceClampScale: 0.9 + contrastAdaptiveSharpening: 0 --- !u!114 &330585548 MonoBehaviour: m_ObjectHideFlags: 0 @@ -597,6 +617,22 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: bcd90519abd2eaa47ab4e721bdbe12c8, type: 3} m_Name: m_EditorClassIdentifier: +--- !u!114 &330585550 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 330585543} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6f97ad1a9bdec0d4eb723002348f6a94, type: 3} + m_Name: + m_EditorClassIdentifier: + flRpmLabel: {fileID: 1249082957} + frRpmLabel: {fileID: 1962769954} + rlRpmLabel: {fileID: 279508388} + rrRpmLabel: {fileID: 212741547} --- !u!1 &410087039 GameObject: m_ObjectHideFlags: 0 @@ -690,7 +726,7 @@ Transform: m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 1 + m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} --- !u!114 &410087042 MonoBehaviour: @@ -704,14 +740,17 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 474bcb49853aa07438625e644c072ee6, type: 3} m_Name: m_EditorClassIdentifier: - m_Version: 1 + m_Version: 3 m_UsePipelineSettings: 1 m_AdditionalLightsShadowResolutionTier: 2 m_LightLayerMask: 1 + m_RenderingLayers: 1 m_CustomShadowLayers: 0 m_ShadowLayerMask: 1 + m_ShadowRenderingLayers: 1 m_LightCookieSize: {x: 1, y: 1} m_LightCookieOffset: {x: 0, y: 0} + m_SoftShadowQuality: 1 --- !u!1 &590315768 GameObject: m_ObjectHideFlags: 0 @@ -1145,8 +1184,8 @@ MonoBehaviour: m_StreamingVersion: 20170927 m_Priority: 10 m_StandbyUpdate: 2 - m_LookAt: {fileID: 1610757029} - m_Follow: {fileID: 1610757029} + m_LookAt: {fileID: 0} + m_Follow: {fileID: 0} m_CommonLens: 1 m_Lens: FieldOfView: 60 @@ -1157,6 +1196,7 @@ MonoBehaviour: ModeOverride: 0 LensShift: {x: 0, y: 0} GateFit: 2 + FocusDistance: 10 m_SensorSize: {x: 1, y: 1} m_Transitions: m_BlendHint: 0 @@ -1349,7 +1389,7 @@ Transform: m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 2 + m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &905580687 GameObject: @@ -1478,6 +1518,79 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: ac0b09e7857660247b1477e93731de29, type: 3} m_Name: m_EditorClassIdentifier: +--- !u!1001 &1017951274 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 6295450445658667873, guid: 8a97cc7d459762945ab8e9f6ae4bac33, + type: 3} + propertyPath: m_RootOrder + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6295450445658667873, guid: 8a97cc7d459762945ab8e9f6ae4bac33, + type: 3} + propertyPath: m_LocalPosition.x + value: 2.6789722 + objectReference: {fileID: 0} + - target: {fileID: 6295450445658667873, guid: 8a97cc7d459762945ab8e9f6ae4bac33, + type: 3} + propertyPath: m_LocalPosition.y + value: 1.4428409 + objectReference: {fileID: 0} + - target: {fileID: 6295450445658667873, guid: 8a97cc7d459762945ab8e9f6ae4bac33, + type: 3} + propertyPath: m_LocalPosition.z + value: -1.0264323 + objectReference: {fileID: 0} + - target: {fileID: 6295450445658667873, guid: 8a97cc7d459762945ab8e9f6ae4bac33, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6295450445658667873, guid: 8a97cc7d459762945ab8e9f6ae4bac33, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6295450445658667873, guid: 8a97cc7d459762945ab8e9f6ae4bac33, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6295450445658667873, guid: 8a97cc7d459762945ab8e9f6ae4bac33, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6295450445658667873, guid: 8a97cc7d459762945ab8e9f6ae4bac33, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6295450445658667873, guid: 8a97cc7d459762945ab8e9f6ae4bac33, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6295450445658667873, guid: 8a97cc7d459762945ab8e9f6ae4bac33, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6635559819384152539, guid: 8a97cc7d459762945ab8e9f6ae4bac33, + type: 3} + propertyPath: m_Name + value: 86 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8a97cc7d459762945ab8e9f6ae4bac33, type: 3} --- !u!1 &1063055264 GameObject: m_ObjectHideFlags: 3 @@ -1531,6 +1644,7 @@ MonoBehaviour: ModeOverride: 0 LensShift: {x: 0, y: 0} GateFit: 2 + FocusDistance: 10 m_SensorSize: {x: 1, y: 1} m_Transitions: m_BlendHint: 0 @@ -1782,6 +1896,7 @@ MonoBehaviour: ModeOverride: 0 LensShift: {x: 0, y: 0} GateFit: 2 + FocusDistance: 10 m_SensorSize: {x: 1, y: 1} m_Transitions: m_BlendHint: 0 @@ -1995,6 +2110,7 @@ MonoBehaviour: ModeOverride: 0 LensShift: {x: 0, y: 0} GateFit: 2 + FocusDistance: 10 m_SensorSize: {x: 1, y: 1} m_Transitions: m_BlendHint: 0 @@ -2047,9 +2163,17 @@ BoxCollider: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1509071307} m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 m_IsTrigger: 0 + m_ProvidesContacts: 0 m_Enabled: 1 - serializedVersion: 2 + serializedVersion: 3 m_Size: {x: 1, y: 1, z: 1} m_Center: {x: 0, y: 0, z: 0} --- !u!23 &1509071309 @@ -2115,7 +2239,7 @@ Transform: m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 3 + m_RootOrder: 4 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1594060431 GameObject: @@ -2244,12 +2368,6 @@ MonoBehaviour: m_BiasX: 0 m_BiasY: 0 m_CenterOnActivate: 1 ---- !u!4 &1610757029 stripped -Transform: - m_CorrespondingSourceObject: {fileID: 6295450445658667873, guid: 8a97cc7d459762945ab8e9f6ae4bac33, - type: 3} - m_PrefabInstance: {fileID: 4166904890576558728} - m_PrefabAsset: {fileID: 0} --- !u!1 &1735399694 GameObject: m_ObjectHideFlags: 0 @@ -2664,7 +2782,9 @@ Canvas: 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 @@ -2730,112 +2850,3 @@ RectTransform: m_AnchoredPosition: {x: -366.1421, y: 417.00006} m_SizeDelta: {x: 244.1437, y: 73.9168} m_Pivot: {x: 0.5, y: 0.5} ---- !u!1001 &4166904890576558728 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - m_TransformParent: {fileID: 0} - m_Modifications: - - target: {fileID: 6295450445658667873, guid: 8a97cc7d459762945ab8e9f6ae4bac33, - type: 3} - propertyPath: m_RootOrder - value: 4 - objectReference: {fileID: 0} - - target: {fileID: 6295450445658667873, guid: 8a97cc7d459762945ab8e9f6ae4bac33, - type: 3} - propertyPath: m_LocalPosition.x - value: -1.3821344 - objectReference: {fileID: 0} - - target: {fileID: 6295450445658667873, guid: 8a97cc7d459762945ab8e9f6ae4bac33, - type: 3} - propertyPath: m_LocalPosition.y - value: 2.67 - objectReference: {fileID: 0} - - target: {fileID: 6295450445658667873, guid: 8a97cc7d459762945ab8e9f6ae4bac33, - type: 3} - propertyPath: m_LocalPosition.z - value: 0.29676378 - objectReference: {fileID: 0} - - target: {fileID: 6295450445658667873, guid: 8a97cc7d459762945ab8e9f6ae4bac33, - type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 6295450445658667873, guid: 8a97cc7d459762945ab8e9f6ae4bac33, - type: 3} - propertyPath: m_LocalRotation.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6295450445658667873, guid: 8a97cc7d459762945ab8e9f6ae4bac33, - type: 3} - propertyPath: m_LocalRotation.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6295450445658667873, guid: 8a97cc7d459762945ab8e9f6ae4bac33, - type: 3} - propertyPath: m_LocalRotation.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6295450445658667873, guid: 8a97cc7d459762945ab8e9f6ae4bac33, - type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6295450445658667873, guid: 8a97cc7d459762945ab8e9f6ae4bac33, - type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6295450445658667873, guid: 8a97cc7d459762945ab8e9f6ae4bac33, - type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6635559819384152539, guid: 8a97cc7d459762945ab8e9f6ae4bac33, - type: 3} - propertyPath: m_Name - value: 86 - objectReference: {fileID: 0} - - target: {fileID: 7484181368601986816, guid: 8a97cc7d459762945ab8e9f6ae4bac33, - type: 3} - propertyPath: flRpmLabel - value: - objectReference: {fileID: 1249082957} - - target: {fileID: 7484181368601986816, guid: 8a97cc7d459762945ab8e9f6ae4bac33, - type: 3} - propertyPath: frRpmLabel - value: - objectReference: {fileID: 1962769954} - - target: {fileID: 7484181368601986816, guid: 8a97cc7d459762945ab8e9f6ae4bac33, - type: 3} - propertyPath: rlRpmLabel - value: - objectReference: {fileID: 279508388} - - target: {fileID: 7484181368601986816, guid: 8a97cc7d459762945ab8e9f6ae4bac33, - type: 3} - propertyPath: rrRpmLabel - value: - objectReference: {fileID: 212741547} - - target: {fileID: 7484181368601986816, guid: 8a97cc7d459762945ab8e9f6ae4bac33, - type: 3} - propertyPath: acceleration - value: 1000 - objectReference: {fileID: 0} - - target: {fileID: 7484181368601986816, guid: 8a97cc7d459762945ab8e9f6ae4bac33, - type: 3} - propertyPath: maxTurnAngle - value: 45 - objectReference: {fileID: 0} - - target: {fileID: 7484181368601986816, guid: 8a97cc7d459762945ab8e9f6ae4bac33, - type: 3} - propertyPath: breakingForce - value: 1000 - objectReference: {fileID: 0} - - target: {fileID: 8171421669866221158, guid: 8a97cc7d459762945ab8e9f6ae4bac33, - type: 3} - propertyPath: m_Mass - value: 1000 - objectReference: {fileID: 0} - m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 8a97cc7d459762945ab8e9f6ae4bac33, type: 3} diff --git a/Assets/Scripts/DebugInfo.cs b/Assets/Scripts/DebugInfo.cs index 96bd353..ccd24da 100644 --- a/Assets/Scripts/DebugInfo.cs +++ b/Assets/Scripts/DebugInfo.cs @@ -1,8 +1,19 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; +using TMPro; public class DebugInfo : MonoBehaviour -{ - +{ + [SerializeField] private TMP_Text flRpmLabel; + [SerializeField] private TMP_Text frRpmLabel; + [SerializeField] private TMP_Text rlRpmLabel; + [SerializeField] private TMP_Text rrRpmLabel; + + public void setRpmLabels(float flRpm, float frRpm, float rlRpm, float rrRpm){ + flRpmLabel.text = flRpm.ToString(); + frRpmLabel.text = frRpm.ToString(); + rlRpmLabel.text = rlRpm.ToString(); + rrRpmLabel.text = rrRpm.ToString(); + } } diff --git a/Assets/Scripts/Wheel.cs b/Assets/Scripts/Wheel.cs new file mode 100644 index 0000000..9733481 --- /dev/null +++ b/Assets/Scripts/Wheel.cs @@ -0,0 +1,35 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +[System.Serializable] +public class Wheel +{ + [SerializeField] private WheelCollider collider; + [SerializeField] private Transform wheel; + [SerializeField] private float wheelSize = 15; //default size change to what the actual size is + + public float GetWheelRPM(){ return collider.rpm; } //return the wheels current rpm + + public void ApplySteerAngle(float steerAngle){ //apply steer angle to wheel to rotate + collider.steerAngle = steerAngle; + } + + public void ApplyBrakeForce(float brakeForce){ //apply brake force to the wheel + collider.brakeTorque = brakeForce; + } + + public void ApplyAcceleration(float acceleration){ //apply acceleration value to the wheel + collider.motorTorque = acceleration; + } + + public void UpdateWheel(){ //rotates the wheel when the car is moving + Vector3 position; + Quaternion rotation; + + collider.GetWorldPose(out position, out rotation); + + wheel.position = position; + wheel.rotation = rotation; + } +} \ No newline at end of file diff --git a/Assets/Scripts/Wheel.cs.meta b/Assets/Scripts/Wheel.cs.meta new file mode 100644 index 0000000..89ad535 --- /dev/null +++ b/Assets/Scripts/Wheel.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a2f70e41819e6cc49ac12be4ce0c0612 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/WheelController.cs b/Assets/Scripts/WheelController.cs index a0b0b62..b11c92f 100644 --- a/Assets/Scripts/WheelController.cs +++ b/Assets/Scripts/WheelController.cs @@ -1,25 +1,14 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; -using TMPro; +using UnityEngine.InputSystem; public class WheelController : MonoBehaviour { - [SerializeField] private WheelCollider frontRightWheelCollider; - [SerializeField] private WheelCollider frontLeftWheelCollider; - [SerializeField] private WheelCollider rearRightWheelCollider; - [SerializeField] private WheelCollider rearLeftWheelCollider; - - //wheel meshes - [SerializeField] private Transform frontRightWheel; - [SerializeField] private Transform frontLeftWheel; - [SerializeField] private Transform rearRightWheel; - [SerializeField] private Transform rearLeftWheel; - - [SerializeField] private TMP_Text flRpmLabel; - [SerializeField] private TMP_Text frRpmLabel; - [SerializeField] private TMP_Text rlRpmLabel; - [SerializeField] private TMP_Text rrRpmLabel; + [SerializeField] private Wheel frontRightWheel; + [SerializeField] private Wheel frontLeftWheel; + [SerializeField] private Wheel rearRightWheel; + [SerializeField] private Wheel rearLeftWheel; public float acceleration = 500f; public float breakingForce = 300f; @@ -29,71 +18,56 @@ public class WheelController : MonoBehaviour private float currentBrakeForce = 0f; private float currentTurnAngle = 0f; - private void Update() { - flRpmLabel.text = getWheelRPM(frontLeftWheelCollider).ToString(); - frRpmLabel.text = getWheelRPM(frontRightWheelCollider).ToString(); - rlRpmLabel.text = getWheelRPM(rearLeftWheelCollider).ToString(); - rrRpmLabel.text = getWheelRPM(rearRightWheelCollider).ToString(); + private DebugInfo debugInfo; + + //inputs + private InputMaster controls; + private InputAction movement; + private InputAction turn; + private InputAction brake; + + private void Awake() { + debugInfo = FindObjectOfType(); + controls = new InputMaster(); } - private float getWheelRPM(WheelCollider wheel){ - return wheel.rpm; + private void Update() { + debugInfo.setRpmLabels(frontLeftWheel.GetWheelRPM(), frontRightWheel.GetWheelRPM(), rearLeftWheel.GetWheelRPM(), rearRightWheel.GetWheelRPM()); } private void FixedUpdate() { + //TODO: Update input info to new input system + //forward reverse input - currentAcceleration = acceleration * Input.GetAxis("Vertical"); + //currentAcceleration = acceleration * Input.GetAxis("Vertical"); + //breaking input - if(Input.GetKey(KeyCode.Space)){ + /*if(Input.GetKey(KeyCode.Space)){ currentBrakeForce = breakingForce; }else{ currentBrakeForce = 0f; - } + }*/ //apply acceleration to front wheels| (this determines which wheel drive is the car (fwd, awd, rwd)) - ApplyAccelerationToWheel(rearRightWheelCollider, currentAcceleration); - ApplyAccelerationToWheel(rearLeftWheelCollider, currentAcceleration); + rearRightWheel.ApplyAcceleration(currentAcceleration); + rearLeftWheel.ApplyAcceleration(currentAcceleration); //break applies to all four wheels - ApplyBrakeToWheel(frontLeftWheelCollider, currentBrakeForce); - ApplyBrakeToWheel(frontRightWheelCollider, currentBrakeForce); - ApplyBrakeToWheel(rearLeftWheelCollider, currentBrakeForce); - ApplyBrakeToWheel(rearRightWheelCollider, currentBrakeForce); + frontLeftWheel.ApplyBrakeForce(currentBrakeForce); + frontRightWheel.ApplyBrakeForce(currentBrakeForce); + rearLeftWheel.ApplyBrakeForce(currentBrakeForce); + rearRightWheel.ApplyBrakeForce(currentBrakeForce); //steering - currentTurnAngle = maxTurnAngle * Input.GetAxis("Horizontal"); //getting steering input - ApplyStreering(currentTurnAngle); + //currentTurnAngle = maxTurnAngle * Input.GetAxis("Horizontal"); //getting steering input + frontLeftWheel.ApplySteerAngle(currentTurnAngle); + frontRightWheel.ApplySteerAngle(currentTurnAngle); //update wheel meshes - UpdateWheel(frontLeftWheelCollider, frontLeftWheel); - UpdateWheel(frontRightWheelCollider, frontRightWheel); - UpdateWheel(rearLeftWheelCollider, rearLeftWheel); - UpdateWheel(rearRightWheelCollider, rearRightWheel); - } - - private void ApplyStreering(float streeringAngle){ - frontLeftWheelCollider.steerAngle = streeringAngle; - frontRightWheelCollider.steerAngle = streeringAngle; - } - - private void ApplyBrakeToWheel(WheelCollider wheel, float breakForce){ - wheel.brakeTorque = breakForce; - } - - private void ApplyAccelerationToWheel(WheelCollider wheel, float acceleration){ - wheel.motorTorque = acceleration; - } - - private void UpdateWheel(WheelCollider collider, Transform wheel){ - //get collider state - Vector3 position; - Quaternion rotation; - - collider.GetWorldPose(out position, out rotation); //puts it into position and rotation - - //set wheel state - wheel.position = position; - wheel.rotation = rotation; + frontLeftWheel.UpdateWheel(); + frontRightWheel.UpdateWheel(); + rearLeftWheel.UpdateWheel(); + rearRightWheel.UpdateWheel(); } } \ No newline at end of file diff --git a/Assets/Settings/URP-Balanced.asset b/Assets/Settings/URP-Balanced.asset index a4c84ef..e7a9487 100644 --- a/Assets/Settings/URP-Balanced.asset +++ b/Assets/Settings/URP-Balanced.asset @@ -12,8 +12,8 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: bf2edee5c58d82540a51f03df9d42094, type: 3} m_Name: URP-Balanced m_EditorClassIdentifier: - k_AssetVersion: 9 - k_AssetPreviousVersion: 9 + k_AssetVersion: 11 + k_AssetPreviousVersion: 11 m_RendererType: 1 m_RendererData: {fileID: 0} m_RendererDataList: @@ -23,13 +23,16 @@ MonoBehaviour: m_RequireOpaqueTexture: 0 m_OpaqueDownsampling: 1 m_SupportsTerrainHoles: 1 - m_StoreActionsOptimization: 0 m_SupportsHDR: 1 + m_HDRColorBufferPrecision: 0 m_MSAA: 1 m_RenderScale: 1 m_UpscalingFilter: 0 m_FsrOverrideSharpness: 0 m_FsrSharpness: 0.92 + m_EnableLODCrossFade: 1 + m_LODCrossFadeDitheringType: 1 + m_ShEvalMode: 0 m_MainLightRenderingMode: 1 m_MainLightShadowsSupported: 1 m_MainLightShadowmapResolution: 1024 @@ -50,16 +53,21 @@ MonoBehaviour: m_CascadeBorder: 0.1 m_ShadowDepthBias: 1 m_ShadowNormalBias: 1 + m_AnyShadowsSupported: 1 m_SoftShadowsSupported: 1 m_ConservativeEnclosingSphere: 0 m_NumIterationsEnclosingSphere: 64 + m_SoftShadowQuality: 2 m_AdditionalLightsCookieResolution: 512 m_AdditionalLightsCookieFormat: 1 m_UseSRPBatcher: 1 m_SupportsDynamicBatching: 0 m_MixedLightingSupported: 1 + m_SupportsLightCookies: 1 m_SupportsLightLayers: 0 m_DebugLevel: 0 + m_StoreActionsOptimization: 0 + m_EnableRenderGraph: 0 m_UseAdaptivePerformance: 1 m_ColorGradingMode: 0 m_ColorGradingLutSize: 32 @@ -69,6 +77,33 @@ MonoBehaviour: m_LocalShadowsAtlasResolution: 256 m_MaxPixelLights: 0 m_ShadowAtlasResolution: 256 - m_ShaderVariantLogLevel: 0 m_VolumeFrameworkUpdateMode: 0 + m_Textures: + blueNoise64LTex: {fileID: 2800000, guid: e3d24661c1e055f45a7560c033dbb837, type: 3} + bayerMatrixTex: {fileID: 2800000, guid: f9ee4ed84c1d10c49aabb9b210b0fc44, type: 3} + m_PrefilteringModeMainLightShadows: 1 + m_PrefilteringModeAdditionalLight: 4 + m_PrefilteringModeAdditionalLightShadows: 1 + m_PrefilterXRKeywords: 0 + m_PrefilteringModeForwardPlus: 1 + m_PrefilteringModeDeferredRendering: 1 + m_PrefilteringModeScreenSpaceOcclusion: 1 + m_PrefilterDebugKeywords: 0 + m_PrefilterWriteRenderingLayers: 0 + m_PrefilterHDROutput: 0 + m_PrefilterSSAODepthNormals: 0 + m_PrefilterSSAOSourceDepthLow: 0 + m_PrefilterSSAOSourceDepthMedium: 0 + m_PrefilterSSAOSourceDepthHigh: 0 + m_PrefilterSSAOInterleaved: 0 + m_PrefilterSSAOBlueNoise: 0 + m_PrefilterSSAOSampleCountLow: 0 + m_PrefilterSSAOSampleCountMedium: 0 + m_PrefilterSSAOSampleCountHigh: 0 + m_PrefilterDBufferMRT1: 0 + m_PrefilterDBufferMRT2: 0 + m_PrefilterDBufferMRT3: 0 + m_PrefilterScreenCoord: 0 + m_PrefilterNativeRenderPass: 0 + m_ShaderVariantLogLevel: 0 m_ShadowCascades: 0 diff --git a/Assets/Settings/URP-HighFidelity-Renderer.asset b/Assets/Settings/URP-HighFidelity-Renderer.asset index 9bb7a06..c0a2da2 100644 --- a/Assets/Settings/URP-HighFidelity-Renderer.asset +++ b/Assets/Settings/URP-HighFidelity-Renderer.asset @@ -13,8 +13,8 @@ MonoBehaviour: m_Name: SSAO m_EditorClassIdentifier: m_Active: 1 - m_Shader: {fileID: 4800000, guid: 0849e84e3d62649e8882e9d6f056a017, type: 3} m_Settings: + AOMethod: 1 Downsample: 0 AfterOpaque: 0 Source: 1 @@ -22,7 +22,19 @@ MonoBehaviour: Intensity: 0.5 DirectLightingStrength: 0.25 Radius: 0.25 - SampleCount: 12 + Samples: 0 + BlurQuality: 0 + Falloff: 100 + SampleCount: -1 + m_BlueNoise256Textures: + - {fileID: 2800000, guid: 36f118343fc974119bee3d09e2111500, type: 3} + - {fileID: 2800000, guid: 4b7b083e6b6734e8bb2838b0b50a0bc8, type: 3} + - {fileID: 2800000, guid: c06cc21c692f94f5fb5206247191eeee, type: 3} + - {fileID: 2800000, guid: cb76dd40fa7654f9587f6a344f125c9a, type: 3} + - {fileID: 2800000, guid: e32226222ff144b24bf3a5a451de54bc, type: 3} + - {fileID: 2800000, guid: 3302065f671a8450b82c9ddf07426f3a, type: 3} + - {fileID: 2800000, guid: 56a77a3e8d64f47b6afe9e3c95cb57d5, type: 3} + m_Shader: {fileID: 4800000, guid: 0849e84e3d62649e8882e9d6f056a017, type: 3} --- !u!114 &11400000 MonoBehaviour: m_ObjectHideFlags: 0 @@ -38,11 +50,13 @@ MonoBehaviour: debugShaders: debugReplacementPS: {fileID: 4800000, guid: cf852408f2e174538bcd9b7fda1c5ae7, type: 3} + hdrDebugViewPS: {fileID: 4800000, guid: 573620ae32aec764abd4d728906d2587, type: 3} m_RendererFeatures: - {fileID: -1878332245247344467} m_RendererFeatureMap: adc0de57c6d2eee5 m_UseNativeRenderPass: 0 postProcessData: {fileID: 11400000, guid: 41439944d30ece34e96484bdb6645b55, type: 2} + xrSystemData: {fileID: 11400000, guid: 60e1133243b97e347b653163a8c01b64, type: 2} shaders: blitPS: {fileID: 4800000, guid: c17132b1f77d20942aa75f8429c0f8bc, type: 3} copyDepthPS: {fileID: 4800000, guid: d6dae50ee9e1bfa4db75f19f99355220, type: 3} @@ -50,15 +64,17 @@ MonoBehaviour: samplingPS: {fileID: 4800000, guid: 04c410c9937594faa893a11dceb85f7e, type: 3} stencilDeferredPS: {fileID: 4800000, guid: e9155b26e1bc55942a41e518703fe304, type: 3} fallbackErrorPS: {fileID: 4800000, guid: e6e9a19c3678ded42a3bc431ebef7dbd, type: 3} + fallbackLoadingPS: {fileID: 4800000, guid: 7f888aff2ac86494babad1c2c5daeee2, type: 3} materialErrorPS: {fileID: 4800000, guid: 5fd9a8feb75a4b5894c241777f519d4e, type: 3} coreBlitPS: {fileID: 4800000, guid: 93446b5c5339d4f00b85c159e1159b7c, type: 3} coreBlitColorAndDepthPS: {fileID: 4800000, guid: d104b2fc1ca6445babb8e90b0758136b, type: 3} + blitHDROverlay: {fileID: 4800000, guid: a89bee29cffa951418fc1e2da94d1959, type: 3} cameraMotionVector: {fileID: 4800000, guid: c56b7e0d4c7cb484e959caeeedae9bbf, type: 3} objectMotionVector: {fileID: 4800000, guid: 7b3ede40266cd49a395def176e1bc486, type: 3} - m_AssetVersion: 1 + m_AssetVersion: 2 m_OpaqueLayerMask: serializedVersion: 2 m_Bits: 4294967295 @@ -75,7 +91,6 @@ MonoBehaviour: m_ShadowTransparentReceive: 1 m_RenderingMode: 0 m_DepthPrimingMode: 1 + m_CopyDepthMode: 0 m_AccurateGbufferNormals: 0 - m_ClusteredRendering: 0 - m_TileSize: 32 m_IntermediateTextureMode: 0 diff --git a/Assets/Settings/URP-HighFidelity.asset b/Assets/Settings/URP-HighFidelity.asset index d611f25..761be00 100644 --- a/Assets/Settings/URP-HighFidelity.asset +++ b/Assets/Settings/URP-HighFidelity.asset @@ -12,8 +12,8 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: bf2edee5c58d82540a51f03df9d42094, type: 3} m_Name: URP-HighFidelity m_EditorClassIdentifier: - k_AssetVersion: 9 - k_AssetPreviousVersion: 9 + k_AssetVersion: 11 + k_AssetPreviousVersion: 11 m_RendererType: 1 m_RendererData: {fileID: 0} m_RendererDataList: @@ -23,13 +23,16 @@ MonoBehaviour: m_RequireOpaqueTexture: 0 m_OpaqueDownsampling: 1 m_SupportsTerrainHoles: 1 - m_StoreActionsOptimization: 0 m_SupportsHDR: 1 + m_HDRColorBufferPrecision: 0 m_MSAA: 8 m_RenderScale: 1 m_UpscalingFilter: 0 m_FsrOverrideSharpness: 0 m_FsrSharpness: 0.92 + m_EnableLODCrossFade: 1 + m_LODCrossFadeDitheringType: 1 + m_ShEvalMode: 0 m_MainLightRenderingMode: 1 m_MainLightShadowsSupported: 1 m_MainLightShadowmapResolution: 4096 @@ -54,13 +57,17 @@ MonoBehaviour: m_SoftShadowsSupported: 1 m_ConservativeEnclosingSphere: 0 m_NumIterationsEnclosingSphere: 64 + m_SoftShadowQuality: 2 m_AdditionalLightsCookieResolution: 4096 m_AdditionalLightsCookieFormat: 4 m_UseSRPBatcher: 1 m_SupportsDynamicBatching: 0 m_MixedLightingSupported: 1 + m_SupportsLightCookies: 1 m_SupportsLightLayers: 0 m_DebugLevel: 0 + m_StoreActionsOptimization: 0 + m_EnableRenderGraph: 0 m_UseAdaptivePerformance: 1 m_ColorGradingMode: 0 m_ColorGradingLutSize: 32 @@ -70,6 +77,33 @@ MonoBehaviour: m_LocalShadowsAtlasResolution: 256 m_MaxPixelLights: 0 m_ShadowAtlasResolution: 256 - m_ShaderVariantLogLevel: 0 m_VolumeFrameworkUpdateMode: 0 + m_Textures: + blueNoise64LTex: {fileID: 2800000, guid: e3d24661c1e055f45a7560c033dbb837, type: 3} + bayerMatrixTex: {fileID: 2800000, guid: f9ee4ed84c1d10c49aabb9b210b0fc44, type: 3} + m_PrefilteringModeMainLightShadows: 1 + m_PrefilteringModeAdditionalLight: 4 + m_PrefilteringModeAdditionalLightShadows: 1 + m_PrefilterXRKeywords: 0 + m_PrefilteringModeForwardPlus: 1 + m_PrefilteringModeDeferredRendering: 1 + m_PrefilteringModeScreenSpaceOcclusion: 1 + m_PrefilterDebugKeywords: 0 + m_PrefilterWriteRenderingLayers: 0 + m_PrefilterHDROutput: 0 + m_PrefilterSSAODepthNormals: 0 + m_PrefilterSSAOSourceDepthLow: 0 + m_PrefilterSSAOSourceDepthMedium: 0 + m_PrefilterSSAOSourceDepthHigh: 0 + m_PrefilterSSAOInterleaved: 0 + m_PrefilterSSAOBlueNoise: 0 + m_PrefilterSSAOSampleCountLow: 0 + m_PrefilterSSAOSampleCountMedium: 0 + m_PrefilterSSAOSampleCountHigh: 0 + m_PrefilterDBufferMRT1: 0 + m_PrefilterDBufferMRT2: 0 + m_PrefilterDBufferMRT3: 0 + m_PrefilterScreenCoord: 0 + m_PrefilterNativeRenderPass: 0 + m_ShaderVariantLogLevel: 0 m_ShadowCascades: 1 diff --git a/Assets/Settings/URP-Performant.asset b/Assets/Settings/URP-Performant.asset index 5e53341..4409b9d 100644 --- a/Assets/Settings/URP-Performant.asset +++ b/Assets/Settings/URP-Performant.asset @@ -12,8 +12,8 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: bf2edee5c58d82540a51f03df9d42094, type: 3} m_Name: URP-Performant m_EditorClassIdentifier: - k_AssetVersion: 9 - k_AssetPreviousVersion: 9 + k_AssetVersion: 11 + k_AssetPreviousVersion: 11 m_RendererType: 1 m_RendererData: {fileID: 0} m_RendererDataList: @@ -23,10 +23,16 @@ MonoBehaviour: m_RequireOpaqueTexture: 0 m_OpaqueDownsampling: 1 m_SupportsTerrainHoles: 1 - m_StoreActionsOptimization: 0 m_SupportsHDR: 0 + m_HDRColorBufferPrecision: 0 m_MSAA: 1 m_RenderScale: 1 + m_UpscalingFilter: 0 + m_FsrOverrideSharpness: 0 + m_FsrSharpness: 0.92 + m_EnableLODCrossFade: 1 + m_LODCrossFadeDitheringType: 1 + m_ShEvalMode: 0 m_MainLightRenderingMode: 1 m_MainLightShadowsSupported: 0 m_MainLightShadowmapResolution: 1024 @@ -47,14 +53,21 @@ MonoBehaviour: m_CascadeBorder: 0.1 m_ShadowDepthBias: 1 m_ShadowNormalBias: 1 + m_AnyShadowsSupported: 1 m_SoftShadowsSupported: 0 + m_ConservativeEnclosingSphere: 0 + m_NumIterationsEnclosingSphere: 64 + m_SoftShadowQuality: 2 m_AdditionalLightsCookieResolution: 2048 m_AdditionalLightsCookieFormat: 3 m_UseSRPBatcher: 1 m_SupportsDynamicBatching: 0 m_MixedLightingSupported: 1 + m_SupportsLightCookies: 1 m_SupportsLightLayers: 0 m_DebugLevel: 0 + m_StoreActionsOptimization: 0 + m_EnableRenderGraph: 0 m_UseAdaptivePerformance: 1 m_ColorGradingMode: 0 m_ColorGradingLutSize: 16 @@ -64,6 +77,33 @@ MonoBehaviour: m_LocalShadowsAtlasResolution: 256 m_MaxPixelLights: 0 m_ShadowAtlasResolution: 256 - m_ShaderVariantLogLevel: 0 m_VolumeFrameworkUpdateMode: 0 + m_Textures: + blueNoise64LTex: {fileID: 2800000, guid: e3d24661c1e055f45a7560c033dbb837, type: 3} + bayerMatrixTex: {fileID: 2800000, guid: f9ee4ed84c1d10c49aabb9b210b0fc44, type: 3} + m_PrefilteringModeMainLightShadows: 1 + m_PrefilteringModeAdditionalLight: 4 + m_PrefilteringModeAdditionalLightShadows: 1 + m_PrefilterXRKeywords: 0 + m_PrefilteringModeForwardPlus: 1 + m_PrefilteringModeDeferredRendering: 1 + m_PrefilteringModeScreenSpaceOcclusion: 1 + m_PrefilterDebugKeywords: 0 + m_PrefilterWriteRenderingLayers: 0 + m_PrefilterHDROutput: 0 + m_PrefilterSSAODepthNormals: 0 + m_PrefilterSSAOSourceDepthLow: 0 + m_PrefilterSSAOSourceDepthMedium: 0 + m_PrefilterSSAOSourceDepthHigh: 0 + m_PrefilterSSAOInterleaved: 0 + m_PrefilterSSAOBlueNoise: 0 + m_PrefilterSSAOSampleCountLow: 0 + m_PrefilterSSAOSampleCountMedium: 0 + m_PrefilterSSAOSampleCountHigh: 0 + m_PrefilterDBufferMRT1: 0 + m_PrefilterDBufferMRT2: 0 + m_PrefilterDBufferMRT3: 0 + m_PrefilterScreenCoord: 0 + m_PrefilterNativeRenderPass: 0 + m_ShaderVariantLogLevel: 0 m_ShadowCascades: 0 diff --git a/Assets/UniversalRenderPipelineGlobalSettings.asset b/Assets/UniversalRenderPipelineGlobalSettings.asset index f84421d..0c0350e 100644 --- a/Assets/UniversalRenderPipelineGlobalSettings.asset +++ b/Assets/UniversalRenderPipelineGlobalSettings.asset @@ -12,7 +12,17 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 2ec995e51a6e251468d2a3fd8a686257, type: 3} m_Name: UniversalRenderPipelineGlobalSettings m_EditorClassIdentifier: - k_AssetVersion: 2 + k_AssetVersion: 3 + m_RenderingLayerNames: + - Light Layer default + - Light Layer 1 + - Light Layer 2 + - Light Layer 3 + - Light Layer 4 + - Light Layer 5 + - Light Layer 6 + - Light Layer 7 + m_ValidRenderingLayers: 255 lightLayerName0: Light Layer default lightLayerName1: Light Layer 1 lightLayerName2: Light Layer 2 @@ -24,4 +34,8 @@ MonoBehaviour: m_StripDebugVariants: 1 m_StripUnusedPostProcessingVariants: 1 m_StripUnusedVariants: 1 + m_StripUnusedLODCrossFadeVariants: 1 + m_StripScreenCoordOverrideVariants: 1 supportRuntimeDebugDisplay: 0 + m_ShaderVariantLogLevel: 0 + m_ExportShaderVariants: 1 diff --git a/Packages/manifest.json b/Packages/manifest.json index 6b093c1..079579c 100644 --- a/Packages/manifest.json +++ b/Packages/manifest.json @@ -1,18 +1,20 @@ { "dependencies": { - "com.unity.cinemachine": "2.8.9", - "com.unity.collab-proxy": "1.17.7", + "com.unity.ai.navigation": "1.1.3", + "com.unity.cinemachine": "2.9.5", + "com.unity.collab-proxy": "2.0.4", "com.unity.ide.visualstudio": "2.0.18", "com.unity.ide.vscode": "1.2.5", + "com.unity.inputsystem": "1.6.1", "com.unity.postprocessing": "3.2.2", "com.unity.probuilder": "5.0.7", - "com.unity.render-pipelines.universal": "12.1.8", + "com.unity.render-pipelines.universal": "14.0.8", "com.unity.test-framework": "1.1.33", "com.unity.textmeshpro": "3.0.6", - "com.unity.timeline": "1.6.5", + "com.unity.timeline": "1.7.4", "com.unity.toolchain.win-x86_64-linux-x86_64": "2.0.5", "com.unity.ugui": "1.0.0", - "com.unity.visualscripting": "1.7.8", + "com.unity.visualscripting": "1.8.0", "com.unity.modules.ai": "1.0.0", "com.unity.modules.androidjni": "1.0.0", "com.unity.modules.animation": "1.0.0", diff --git a/Packages/packages-lock.json b/Packages/packages-lock.json index c29fe76..24807ea 100644 --- a/Packages/packages-lock.json +++ b/Packages/packages-lock.json @@ -1,7 +1,16 @@ { "dependencies": { + "com.unity.ai.navigation": { + "version": "1.1.3", + "depth": 0, + "source": "registry", + "dependencies": { + "com.unity.modules.ai": "1.0.0" + }, + "url": "https://packages.unity.com" + }, "com.unity.burst": { - "version": "1.8.2", + "version": "1.8.4", "depth": 1, "source": "registry", "dependencies": { @@ -10,7 +19,7 @@ "url": "https://packages.unity.com" }, "com.unity.cinemachine": { - "version": "2.8.9", + "version": "2.9.5", "depth": 0, "source": "registry", "dependencies": { @@ -19,12 +28,10 @@ "url": "https://packages.unity.com" }, "com.unity.collab-proxy": { - "version": "1.17.7", + "version": "2.0.4", "depth": 0, "source": "registry", - "dependencies": { - "com.unity.services.core": "1.0.1" - }, + "dependencies": {}, "url": "https://packages.unity.com" }, "com.unity.ext.nunit": { @@ -50,6 +57,15 @@ "dependencies": {}, "url": "https://packages.unity.com" }, + "com.unity.inputsystem": { + "version": "1.6.1", + "depth": 0, + "source": "registry", + "dependencies": { + "com.unity.modules.uielements": "1.0.0" + }, + "url": "https://packages.unity.com" + }, "com.unity.mathematics": { "version": "1.2.6", "depth": 1, @@ -57,13 +73,6 @@ "dependencies": {}, "url": "https://packages.unity.com" }, - "com.unity.nuget.newtonsoft-json": { - "version": "3.0.2", - "depth": 2, - "source": "registry", - "dependencies": {}, - "url": "https://packages.unity.com" - }, "com.unity.postprocessing": { "version": "3.2.2", "depth": 0, @@ -85,58 +94,48 @@ "url": "https://packages.unity.com" }, "com.unity.render-pipelines.core": { - "version": "12.1.8", + "version": "14.0.8", "depth": 1, "source": "builtin", "dependencies": { "com.unity.ugui": "1.0.0", "com.unity.modules.physics": "1.0.0", + "com.unity.modules.terrain": "1.0.0", "com.unity.modules.jsonserialize": "1.0.0" } }, "com.unity.render-pipelines.universal": { - "version": "12.1.8", + "version": "14.0.8", "depth": 0, "source": "builtin", "dependencies": { "com.unity.mathematics": "1.2.1", - "com.unity.burst": "1.8.2", - "com.unity.render-pipelines.core": "12.1.8", - "com.unity.shadergraph": "12.1.8" + "com.unity.burst": "1.8.4", + "com.unity.render-pipelines.core": "14.0.8", + "com.unity.shadergraph": "14.0.8" } }, "com.unity.searcher": { - "version": "4.9.1", + "version": "4.9.2", "depth": 2, "source": "registry", "dependencies": {}, "url": "https://packages.unity.com" }, - "com.unity.services.core": { - "version": "1.6.0", - "depth": 1, - "source": "registry", - "dependencies": { - "com.unity.modules.unitywebrequest": "1.0.0", - "com.unity.nuget.newtonsoft-json": "3.0.2", - "com.unity.modules.androidjni": "1.0.0" - }, - "url": "https://packages.unity.com" - }, "com.unity.settings-manager": { - "version": "1.0.3", + "version": "2.0.1", "depth": 1, "source": "registry", "dependencies": {}, "url": "https://packages.unity.com" }, "com.unity.shadergraph": { - "version": "12.1.8", + "version": "14.0.8", "depth": 1, "source": "builtin", "dependencies": { - "com.unity.render-pipelines.core": "12.1.8", - "com.unity.searcher": "4.9.1" + "com.unity.render-pipelines.core": "14.0.8", + "com.unity.searcher": "4.9.2" } }, "com.unity.sysroot": { @@ -176,7 +175,7 @@ "url": "https://packages.unity.com" }, "com.unity.timeline": { - "version": "1.6.5", + "version": "1.7.4", "depth": 0, "source": "registry", "dependencies": { @@ -207,7 +206,7 @@ } }, "com.unity.visualscripting": { - "version": "1.7.8", + "version": "1.8.0", "depth": 0, "source": "registry", "dependencies": { @@ -348,17 +347,6 @@ "version": "1.0.0", "depth": 0, "source": "builtin", - "dependencies": { - "com.unity.modules.ui": "1.0.0", - "com.unity.modules.imgui": "1.0.0", - "com.unity.modules.jsonserialize": "1.0.0", - "com.unity.modules.uielementsnative": "1.0.0" - } - }, - "com.unity.modules.uielementsnative": { - "version": "1.0.0", - "depth": 1, - "source": "builtin", "dependencies": { "com.unity.modules.ui": "1.0.0", "com.unity.modules.imgui": "1.0.0", diff --git a/ProjectSettings/Packages/com.unity.probuilder/Settings.json b/ProjectSettings/Packages/com.unity.probuilder/Settings.json index 330c9a4..9ef698c 100644 --- a/ProjectSettings/Packages/com.unity.probuilder/Settings.json +++ b/ProjectSettings/Packages/com.unity.probuilder/Settings.json @@ -1,6 +1,4 @@ { - "m_Name": "Settings", - "m_Path": "ProjectSettings/Packages/com.unity.probuilder/Settings.json", "m_Dictionary": { "m_DictionaryValues": [ { diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index b3a02ec..48d908d 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -3,7 +3,7 @@ --- !u!129 &1 PlayerSettings: m_ObjectHideFlags: 0 - serializedVersion: 23 + serializedVersion: 26 productGUID: a01cc2e45cc07e846b1840350bb172a3 AndroidProfiler: 0 AndroidFilterTouchesWhenObscured: 0 @@ -48,14 +48,15 @@ PlayerSettings: defaultScreenHeightWeb: 600 m_StereoRenderingPath: 0 m_ActiveColorSpace: 1 + m_SpriteBatchVertexThreshold: 300 m_MTRendering: 1 mipStripping: 0 numberOfMipsStripped: 0 + numberOfMipsStrippedPerMipmapLimitGroup: {} m_StackTraceTypes: 010000000100000001000000010000000100000001000000 iosShowActivityIndicatorOnLoading: -1 androidShowActivityIndicatorOnLoading: -1 iosUseCustomAppBackgroundBehavior: 0 - iosAllowHTTPDownload: 1 allowedAutorotateToPortrait: 1 allowedAutorotateToPortraitUpsideDown: 1 allowedAutorotateToLandscapeRight: 1 @@ -119,8 +120,11 @@ PlayerSettings: switchNVNShaderPoolsGranularity: 33554432 switchNVNDefaultPoolsGranularity: 16777216 switchNVNOtherPoolsGranularity: 16777216 + switchGpuScratchPoolGranularity: 2097152 + switchAllowGpuScratchShrinking: 0 switchNVNMaxPublicTextureIDCount: 0 switchNVNMaxPublicSamplerIDCount: 0 + switchNVNGraphicsFirmwareMemory: 32 stadiaPresentMode: 0 stadiaTargetFramerate: 0 vulkanNumSwapchainBuffers: 3 @@ -128,12 +132,7 @@ PlayerSettings: vulkanEnablePreTransform: 1 vulkanEnableLateAcquireNextImage: 0 vulkanEnableCommandBufferRecycling: 1 - m_SupportedAspectRatios: - 4:3: 1 - 5:4: 1 - 16:10: 1 - 16:9: 1 - Others: 1 + loadStoreDebugModeEnabled: 0 bundleVersion: 0.1.0 preloadedAssets: [] metroInputSource: 0 @@ -147,7 +146,7 @@ PlayerSettings: enableFrameTimingStats: 0 enableOpenGLProfilerGPURecorders: 1 useHDRDisplay: 0 - D3DHDRBitDepth: 0 + hdrBitDepth: 0 m_ColorGamuts: 00000000 targetPixelDensity: 30 resolutionScalingMode: 0 @@ -177,12 +176,13 @@ PlayerSettings: APKExpansionFiles: 0 keepLoadedShadersAlive: 0 StripUnusedMeshComponents: 0 + strictShaderVariantMatching: 0 VertexChannelCompressionMask: 4054 iPhoneSdkVersion: 988 - iOSTargetOSVersionString: 11.0 + iOSTargetOSVersionString: 12.0 tvOSSdkVersion: 0 tvOSRequireExtendedGameController: 0 - tvOSTargetOSVersionString: 11.0 + tvOSTargetOSVersionString: 12.0 uIPrerenderedIcon: 0 uIRequiresPersistentWiFi: 0 uIRequiresFullScreen: 1 @@ -246,6 +246,7 @@ PlayerSettings: useCustomLauncherGradleManifest: 0 useCustomBaseGradleTemplate: 0 useCustomGradlePropertiesTemplate: 0 + useCustomGradleSettingsTemplate: 0 useCustomProguardFile: 0 AndroidTargetArchitectures: 1 AndroidTargetDevices: 0 @@ -253,6 +254,7 @@ PlayerSettings: androidSplashScreen: {fileID: 0} AndroidKeystoreName: AndroidKeyaliasName: + AndroidEnableArmv9SecurityFeatures: 0 AndroidBuildApkPerCpuArchitecture: 0 AndroidTVCompatibility: 0 AndroidIsGame: 1 @@ -266,7 +268,6 @@ PlayerSettings: banner: {fileID: 0} androidGamepadSupportLevel: 0 chromeosInputEmulation: 1 - AndroidMinifyWithR8: 0 AndroidMinifyRelease: 0 AndroidMinifyDebug: 0 AndroidValidateAppBundleSize: 1 @@ -522,9 +523,13 @@ PlayerSettings: iPhone: 1 tvOS: 1 m_BuildTargetGroupLightmapEncodingQuality: + - m_BuildTarget: Android + m_EncodingQuality: 1 + m_BuildTargetGroupHDRCubemapEncodingQuality: - m_BuildTarget: Android m_EncodingQuality: 1 m_BuildTargetGroupLightmapSettings: [] + m_BuildTargetGroupLoadStoreDebugModeSettings: [] m_BuildTargetNormalMapEncoding: - m_BuildTarget: Android m_Encoding: 1 @@ -541,6 +546,7 @@ PlayerSettings: locationUsageDescription: microphoneUsageDescription: bluetoothUsageDescription: + macOSTargetOSVersion: 10.13.0 switchNMETAOverride: switchNetLibKey: switchSocketMemoryPoolSize: 6144 @@ -552,6 +558,7 @@ PlayerSettings: switchLTOSetting: 0 switchApplicationID: 0x01004b9000490000 switchNSODependencies: + switchCompilerFlags: switchTitleNames_0: switchTitleNames_1: switchTitleNames_2: @@ -625,7 +632,6 @@ PlayerSettings: switchReleaseVersion: 0 switchDisplayVersion: 1.0.0 switchStartupUserAccount: 0 - switchTouchScreenUsage: 0 switchSupportedLanguagesMask: 0 switchLogoType: 0 switchApplicationErrorCodeCategory: @@ -667,6 +673,7 @@ PlayerSettings: switchNativeFsCacheSize: 32 switchIsHoldTypeHorizontal: 0 switchSupportedNpadCount: 8 + switchEnableTouchScreen: 1 switchSocketConfigEnabled: 0 switchTcpInitialSendBufferSize: 32 switchTcpInitialReceiveBufferSize: 64 @@ -767,6 +774,7 @@ PlayerSettings: webGLMemorySize: 32 webGLExceptionSupport: 1 webGLNameFilesAsHashes: 0 + webGLShowDiagnostics: 0 webGLDataCaching: 1 webGLDebugSymbols: 0 webGLEmscriptenArgs: @@ -779,15 +787,24 @@ PlayerSettings: webGLLinkerTarget: 1 webGLThreadsSupport: 0 webGLDecompressionFallback: 0 + webGLInitialMemorySize: 32 + webGLMaximumMemorySize: 2048 + webGLMemoryGrowthMode: 2 + webGLMemoryLinearGrowthStep: 16 + webGLMemoryGeometricGrowthStep: 0.2 + webGLMemoryGeometricGrowthCap: 96 webGLPowerPreference: 2 scriptingDefineSymbols: Android: UNITY_POST_PROCESSING_STACK_V2 EmbeddedLinux: UNITY_POST_PROCESSING_STACK_V2 + GameCoreScarlett: UNITY_POST_PROCESSING_STACK_V2 GameCoreXboxOne: UNITY_POST_PROCESSING_STACK_V2 + LinuxHeadlessSimulation: UNITY_POST_PROCESSING_STACK_V2 Lumin: UNITY_POST_PROCESSING_STACK_V2 Nintendo Switch: UNITY_POST_PROCESSING_STACK_V2 PS4: UNITY_POST_PROCESSING_STACK_V2 PS5: UNITY_POST_PROCESSING_STACK_V2 + QNX: UNITY_POST_PROCESSING_STACK_V2 Stadia: UNITY_POST_PROCESSING_STACK_V2 Standalone: UNITY_POST_PROCESSING_STACK_V2 WebGL: UNITY_POST_PROCESSING_STACK_V2 @@ -798,17 +815,29 @@ PlayerSettings: platformArchitecture: {} scriptingBackend: {} il2cppCompilerConfiguration: {} - managedStrippingLevel: {} + il2cppCodeGeneration: {} + managedStrippingLevel: + EmbeddedLinux: 1 + GameCoreScarlett: 1 + GameCoreXboxOne: 1 + Nintendo Switch: 1 + PS4: 1 + PS5: 1 + QNX: 1 + Stadia: 1 + WebGL: 1 + Windows Store Apps: 1 + XboxOne: 1 + iPhone: 1 + tvOS: 1 incrementalIl2cppBuild: {} suppressCommonWarnings: 1 allowUnsafeCode: 0 useDeterministicCompilation: 1 - enableRoslynAnalyzers: 1 selectedPlatform: 0 additionalIl2CppArgs: scriptingRuntimeVersion: 1 gcIncremental: 0 - assemblyVersionValidation: 1 gcWBarrierValidation: 0 apiCompatibilityLevelPerPlatform: {} m_RenderingPath: 1 @@ -881,8 +910,13 @@ PlayerSettings: luminVersion: m_VersionCode: 1 m_VersionName: + hmiPlayerDataPath: + hmiForceSRGBBlit: 1 + embeddedLinuxEnableGamepadInput: 1 + hmiLogStartupTiming: 0 + hmiCpuConfiguration: apiCompatibilityLevel: 6 - activeInputHandler: 0 + activeInputHandler: 1 windowsGamepadBackendHint: 0 cloudProjectId: framebufferDepthMemorylessMode: 0 @@ -891,6 +925,7 @@ PlayerSettings: organizationId: cloudEnabled: 0 legacyClampBlendShapeWeights: 0 - playerDataPath: - forceSRGBBlit: 1 + hmiLoadingImage: {fileID: 0} + platformRequiresReadableAssets: 0 virtualTexturingSupportEnabled: 0 + insecureHttpOption: 0 diff --git a/ProjectSettings/ProjectVersion.txt b/ProjectSettings/ProjectVersion.txt index 3643b02..8fcd994 100644 --- a/ProjectSettings/ProjectVersion.txt +++ b/ProjectSettings/ProjectVersion.txt @@ -1,2 +1,2 @@ -m_EditorVersion: 2021.3.16f1 -m_EditorVersionWithRevision: 2021.3.16f1 (4016570cf34f) +m_EditorVersion: 2022.3.1f1 +m_EditorVersionWithRevision: 2022.3.1f1 (f18e0c1b5784) diff --git a/ProjectSettings/URPProjectSettings.asset b/ProjectSettings/URPProjectSettings.asset index c1f118a..cd7fd8c 100644 --- a/ProjectSettings/URPProjectSettings.asset +++ b/ProjectSettings/URPProjectSettings.asset @@ -12,4 +12,4 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 247994e1f5a72c2419c26a37e9334c01, type: 3} m_Name: m_EditorClassIdentifier: - m_LastMaterialVersion: 5 + m_LastMaterialVersion: 7 diff --git a/ProjectSettings/boot.config b/ProjectSettings/boot.config deleted file mode 100644 index e69de29..0000000