From f9ab978fc6eff89eb1bfd0107ce9d3826fa89e8a Mon Sep 17 00:00:00 2001 From: Roman <1325980292@qq.com> Date: Thu, 1 Jul 2021 23:35:25 +0800 Subject: [PATCH] =?UTF-8?q?1.=E5=AE=8C=E6=88=90=E7=A7=BB=E5=8A=A8=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=EF=BC=8C=E6=89=8B=E6=9F=84=E6=91=87=E6=9D=86=E5=B7=A6?= =?UTF-8?q?=E5=8F=B3=E6=8E=A7=E5=88=B6=E5=B7=A6=E5=8F=B3=EF=BC=8C=E9=94=AE?= =?UTF-8?q?=E7=9B=98AD=E6=8E=A7=E5=B7=A6=E5=8F=B3=202.=E5=AE=8C=E6=88=90?= =?UTF-8?q?=E8=B7=91=E5=8A=A8=E5=8A=9F=E8=83=BD=EF=BC=8C=E6=89=8B=E6=9F=84?= =?UTF-8?q?RB=E6=8E=A7=E5=88=B6=E8=B7=91=E5=8A=A8=EF=BC=8C=E9=94=AE?= =?UTF-8?q?=E7=9B=98Shift=E6=8E=A7=E5=88=B6=E8=B7=91=E5=8A=A8=203.?= =?UTF-8?q?=E5=AE=8C=E6=88=90=E4=BA=A4=E4=BA=92=E5=8A=9F=E8=83=BD=EF=BC=8C?= =?UTF-8?q?=E6=89=8B=E6=9F=84X=E4=B8=8E=E7=89=A9=E4=BD=93=E4=BA=A4?= =?UTF-8?q?=E4=BA=92=EF=BC=8C=E9=94=AE=E7=9B=98F=E4=B8=8E=E7=89=A9?= =?UTF-8?q?=E4=BD=93=E4=BA=A4=E4=BA=92=204.=E5=AE=8C=E6=88=90=E6=89=93?= =?UTF-8?q?=E7=A0=81=E5=8A=9F=E8=83=BD=EF=BC=8C=E6=89=8B=E6=9F=84RT?= =?UTF-8?q?=E7=9F=AD=E6=8C=89=E6=89=93.=EF=BC=8C=E9=95=BF=E6=8C=89?= =?UTF-8?q?=E6=89=93-=EF=BC=8C=E9=94=AE=E7=9B=98=E5=BF=98=E4=BA=86?= =?UTF-8?q?=E9=80=82=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/InputAssets.meta | 8 + .../InputSystem.inputsettings.asset | 4 +- .../InputSystem.inputsettings.asset.meta | 0 Assets/InputAssets/Player.cs | 333 +++++++ Assets/{ => InputAssets}/Player.cs.meta | 2 +- Assets/InputAssets/Player.inputactions | 195 ++++ Assets/InputAssets/Player.inputactions.meta | 14 + Assets/Samples.meta | 8 + Assets/Samples/Input System.meta | 8 + Assets/Samples/Input System/1.0.2.meta | 8 + .../Input System/1.0.2/Simple Demo.meta | 8 + .../1.0.2/Simple Demo/.sample.json | 4 + .../1.0.2/Simple Demo/.sample.json.meta | 3 + .../1.0.2/Simple Demo/Environment.prefab | 590 +++++++++++ .../1.0.2/Simple Demo/Environment.prefab.meta | 7 + .../Input System/1.0.2/Simple Demo/README.md | 191 ++++ .../1.0.2/Simple Demo/README.md.meta | 7 + .../SimpleController_UsingActionAsset.cs | 117 +++ .../SimpleController_UsingActionAsset.cs.meta | 11 + .../SimpleController_UsingActions.cs | 128 +++ .../SimpleController_UsingActions.cs.meta | 11 + .../SimpleController_UsingPlayerInput.cs | 113 +++ .../SimpleController_UsingPlayerInput.cs.meta | 3 + .../SimpleController_UsingState.cs | 78 ++ .../SimpleController_UsingState.cs.meta | 11 + .../1.0.2/Simple Demo/SimpleControls.cs | 256 +++++ .../1.0.2/Simple Demo/SimpleControls.cs.meta | 11 + .../Simple Demo/SimpleControls.inputactions | 137 +++ .../SimpleControls.inputactions.meta | 14 + .../SimpleDemo_UsingActionAsset.unity | 333 +++++++ .../SimpleDemo_UsingActionAsset.unity.meta | 7 + .../Simple Demo/SimpleDemo_UsingActions.unity | 380 ++++++++ .../SimpleDemo_UsingActions.unity.meta | 7 + .../SimpleDemo_UsingPlayerInput.unity | 416 ++++++++ .../SimpleDemo_UsingPlayerInput.unity.meta | 7 + .../Simple Demo/SimpleDemo_UsingState.unity | 331 +++++++ .../SimpleDemo_UsingState.unity.meta | 7 + .../1.0.2/Simple Demo/SimpleProjectile.prefab | 114 +++ .../Simple Demo/SimpleProjectile.prefab.meta | 9 + Assets/Scenes/SampleScene.unity | 922 ++++++++++++++++++ Assets/Scripts.meta | 8 + Assets/Scripts/IndexRecoder.cs | 24 + Assets/Scripts/IndexRecoder.cs.meta | 11 + Assets/Scripts/Interactive.cs | 44 + Assets/Scripts/Interactive.cs.meta | 11 + Assets/Scripts/M_Player.cs | 131 +++ Assets/Scripts/M_Player.cs.meta | 11 + Assets/{Player.cs => Scripts/Machine.cs} | 17 +- Assets/Scripts/Machine.cs.meta | 11 + Logs/ApiUpdaterCheck.txt | 80 ++ ProjectSettings/EditorBuildSettings.asset | 3 +- UserSettings/EditorUserSettings.asset | 12 + 52 files changed, 5170 insertions(+), 6 deletions(-) create mode 100644 Assets/InputAssets.meta rename Assets/{ => InputAssets}/InputSystem.inputsettings.asset (93%) rename Assets/{ => InputAssets}/InputSystem.inputsettings.asset.meta (100%) create mode 100644 Assets/InputAssets/Player.cs rename Assets/{ => InputAssets}/Player.cs.meta (83%) create mode 100644 Assets/InputAssets/Player.inputactions create mode 100644 Assets/InputAssets/Player.inputactions.meta create mode 100644 Assets/Samples.meta create mode 100644 Assets/Samples/Input System.meta create mode 100644 Assets/Samples/Input System/1.0.2.meta create mode 100644 Assets/Samples/Input System/1.0.2/Simple Demo.meta create mode 100644 Assets/Samples/Input System/1.0.2/Simple Demo/.sample.json create mode 100644 Assets/Samples/Input System/1.0.2/Simple Demo/.sample.json.meta create mode 100644 Assets/Samples/Input System/1.0.2/Simple Demo/Environment.prefab create mode 100644 Assets/Samples/Input System/1.0.2/Simple Demo/Environment.prefab.meta create mode 100644 Assets/Samples/Input System/1.0.2/Simple Demo/README.md create mode 100644 Assets/Samples/Input System/1.0.2/Simple Demo/README.md.meta create mode 100644 Assets/Samples/Input System/1.0.2/Simple Demo/SimpleController_UsingActionAsset.cs create mode 100644 Assets/Samples/Input System/1.0.2/Simple Demo/SimpleController_UsingActionAsset.cs.meta create mode 100644 Assets/Samples/Input System/1.0.2/Simple Demo/SimpleController_UsingActions.cs create mode 100644 Assets/Samples/Input System/1.0.2/Simple Demo/SimpleController_UsingActions.cs.meta create mode 100644 Assets/Samples/Input System/1.0.2/Simple Demo/SimpleController_UsingPlayerInput.cs create mode 100644 Assets/Samples/Input System/1.0.2/Simple Demo/SimpleController_UsingPlayerInput.cs.meta create mode 100644 Assets/Samples/Input System/1.0.2/Simple Demo/SimpleController_UsingState.cs create mode 100644 Assets/Samples/Input System/1.0.2/Simple Demo/SimpleController_UsingState.cs.meta create mode 100644 Assets/Samples/Input System/1.0.2/Simple Demo/SimpleControls.cs create mode 100644 Assets/Samples/Input System/1.0.2/Simple Demo/SimpleControls.cs.meta create mode 100644 Assets/Samples/Input System/1.0.2/Simple Demo/SimpleControls.inputactions create mode 100644 Assets/Samples/Input System/1.0.2/Simple Demo/SimpleControls.inputactions.meta create mode 100644 Assets/Samples/Input System/1.0.2/Simple Demo/SimpleDemo_UsingActionAsset.unity create mode 100644 Assets/Samples/Input System/1.0.2/Simple Demo/SimpleDemo_UsingActionAsset.unity.meta create mode 100644 Assets/Samples/Input System/1.0.2/Simple Demo/SimpleDemo_UsingActions.unity create mode 100644 Assets/Samples/Input System/1.0.2/Simple Demo/SimpleDemo_UsingActions.unity.meta create mode 100644 Assets/Samples/Input System/1.0.2/Simple Demo/SimpleDemo_UsingPlayerInput.unity create mode 100644 Assets/Samples/Input System/1.0.2/Simple Demo/SimpleDemo_UsingPlayerInput.unity.meta create mode 100644 Assets/Samples/Input System/1.0.2/Simple Demo/SimpleDemo_UsingState.unity create mode 100644 Assets/Samples/Input System/1.0.2/Simple Demo/SimpleDemo_UsingState.unity.meta create mode 100644 Assets/Samples/Input System/1.0.2/Simple Demo/SimpleProjectile.prefab create mode 100644 Assets/Samples/Input System/1.0.2/Simple Demo/SimpleProjectile.prefab.meta create mode 100644 Assets/Scripts.meta create mode 100644 Assets/Scripts/IndexRecoder.cs create mode 100644 Assets/Scripts/IndexRecoder.cs.meta create mode 100644 Assets/Scripts/Interactive.cs create mode 100644 Assets/Scripts/Interactive.cs.meta create mode 100644 Assets/Scripts/M_Player.cs create mode 100644 Assets/Scripts/M_Player.cs.meta rename Assets/{Player.cs => Scripts/Machine.cs} (50%) create mode 100644 Assets/Scripts/Machine.cs.meta create mode 100644 Logs/ApiUpdaterCheck.txt diff --git a/Assets/InputAssets.meta b/Assets/InputAssets.meta new file mode 100644 index 0000000..101c56c --- /dev/null +++ b/Assets/InputAssets.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 620a2f790da7269478c0ab2b65476689 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/InputSystem.inputsettings.asset b/Assets/InputAssets/InputSystem.inputsettings.asset similarity index 93% rename from Assets/InputSystem.inputsettings.asset rename to Assets/InputAssets/InputSystem.inputsettings.asset index 1b236ef..7319a87 100644 --- a/Assets/InputSystem.inputsettings.asset +++ b/Assets/InputAssets/InputSystem.inputsettings.asset @@ -12,7 +12,9 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: c46f07b5ed07e4e92aa78254188d3d10, type: 3} m_Name: InputSystem.inputsettings m_EditorClassIdentifier: - m_SupportedDevices: [] + m_SupportedDevices: + - Gamepad + - Keyboard m_UpdateMode: 1 m_CompensateForScreenOrientation: 1 m_FilterNoiseOnCurrent: 0 diff --git a/Assets/InputSystem.inputsettings.asset.meta b/Assets/InputAssets/InputSystem.inputsettings.asset.meta similarity index 100% rename from Assets/InputSystem.inputsettings.asset.meta rename to Assets/InputAssets/InputSystem.inputsettings.asset.meta diff --git a/Assets/InputAssets/Player.cs b/Assets/InputAssets/Player.cs new file mode 100644 index 0000000..9e491f7 --- /dev/null +++ b/Assets/InputAssets/Player.cs @@ -0,0 +1,333 @@ +// GENERATED AUTOMATICALLY FROM 'Assets/InputAssets/Player.inputactions' + +using System; +using System.Collections; +using System.Collections.Generic; +using UnityEngine.InputSystem; +using UnityEngine.InputSystem.Utilities; + +public class @Player : IInputActionCollection, IDisposable +{ + public InputActionAsset asset { get; } + public @Player() + { + asset = InputActionAsset.FromJson(@"{ + ""name"": ""Player"", + ""maps"": [ + { + ""name"": ""PlayerNormal"", + ""id"": ""fed7b745-1bc5-4e0b-a0e3-12ba77260d19"", + ""actions"": [ + { + ""name"": ""MoveHorizons"", + ""type"": ""Value"", + ""id"": ""5a93f020-27b4-4cb6-975f-af9ed1ef4ec3"", + ""expectedControlType"": ""Axis"", + ""processors"": """", + ""interactions"": """" + }, + { + ""name"": ""Run"", + ""type"": ""Button"", + ""id"": ""5c554403-34b9-4a85-a8f5-ac58363cad75"", + ""expectedControlType"": ""Button"", + ""processors"": """", + ""interactions"": ""Press(behavior=2)"" + }, + { + ""name"": ""Interaction"", + ""type"": ""Button"", + ""id"": ""a3099043-3ac2-4656-8595-f0c577842621"", + ""expectedControlType"": ""Button"", + ""processors"": """", + ""interactions"": ""Press(behavior=2)"" + }, + { + ""name"": ""Coding"", + ""type"": ""Button"", + ""id"": ""f7af9390-5dad-4c80-a4a7-83d8314f8e88"", + ""expectedControlType"": ""Button"", + ""processors"": """", + ""interactions"": ""Press(behavior=2)"" + } + ], + ""bindings"": [ + { + ""name"": ""Keyboard"", + ""id"": ""1fbfd71c-7027-405d-a1ed-1fc210b6164f"", + ""path"": ""1DAxis"", + ""interactions"": """", + ""processors"": """", + ""groups"": """", + ""action"": ""MoveHorizons"", + ""isComposite"": true, + ""isPartOfComposite"": false + }, + { + ""name"": ""negative"", + ""id"": ""68266135-01e4-4afc-96c0-ea13a80f3480"", + ""path"": ""/a"", + ""interactions"": """", + ""processors"": """", + ""groups"": ""Player"", + ""action"": ""MoveHorizons"", + ""isComposite"": false, + ""isPartOfComposite"": true + }, + { + ""name"": ""positive"", + ""id"": ""239ae58a-4ed8-4a1c-a712-875cc1a5a00b"", + ""path"": ""/d"", + ""interactions"": """", + ""processors"": """", + ""groups"": ""Player"", + ""action"": ""MoveHorizons"", + ""isComposite"": false, + ""isPartOfComposite"": true + }, + { + ""name"": ""GamePad"", + ""id"": ""fe14fc96-6976-4535-9110-34ee485476e9"", + ""path"": ""1DAxis"", + ""interactions"": """", + ""processors"": """", + ""groups"": """", + ""action"": ""MoveHorizons"", + ""isComposite"": true, + ""isPartOfComposite"": false + }, + { + ""name"": ""negative"", + ""id"": ""28b72bc6-4f68-4a0a-b630-d71e22d0d6ec"", + ""path"": ""/leftStick/left"", + ""interactions"": """", + ""processors"": """", + ""groups"": ""Player"", + ""action"": ""MoveHorizons"", + ""isComposite"": false, + ""isPartOfComposite"": true + }, + { + ""name"": ""positive"", + ""id"": ""81388851-93e1-42a6-88f8-2eccb63c984d"", + ""path"": ""/leftStick/right"", + ""interactions"": """", + ""processors"": """", + ""groups"": ""Player"", + ""action"": ""MoveHorizons"", + ""isComposite"": false, + ""isPartOfComposite"": true + }, + { + ""name"": """", + ""id"": ""b0789a3f-5494-4bae-96bb-36eab3a52419"", + ""path"": ""/rightShoulder"", + ""interactions"": """", + ""processors"": """", + ""groups"": ""Player"", + ""action"": ""Run"", + ""isComposite"": false, + ""isPartOfComposite"": false + }, + { + ""name"": """", + ""id"": ""975884c6-576e-4b0b-adb7-f0883ff247e9"", + ""path"": ""/shift"", + ""interactions"": """", + ""processors"": """", + ""groups"": ""Player"", + ""action"": ""Run"", + ""isComposite"": false, + ""isPartOfComposite"": false + }, + { + ""name"": """", + ""id"": ""c35dfc0f-020b-4d7f-b2ca-5b54e24145f5"", + ""path"": ""/buttonWest"", + ""interactions"": """", + ""processors"": """", + ""groups"": ""Player"", + ""action"": ""Interaction"", + ""isComposite"": false, + ""isPartOfComposite"": false + }, + { + ""name"": """", + ""id"": ""31e28f16-f6f5-4fc1-b9b6-7b1d27b1b051"", + ""path"": ""/f"", + ""interactions"": """", + ""processors"": """", + ""groups"": ""Player"", + ""action"": ""Interaction"", + ""isComposite"": false, + ""isPartOfComposite"": false + }, + { + ""name"": """", + ""id"": ""f934f611-8c36-46c6-ac79-b5cb10f172f8"", + ""path"": ""/rightTrigger"", + ""interactions"": """", + ""processors"": """", + ""groups"": ""Player"", + ""action"": ""Coding"", + ""isComposite"": false, + ""isPartOfComposite"": false + }, + { + ""name"": """", + ""id"": ""eb88999b-e1c9-4d1e-9b74-683dc913e3a1"", + ""path"": ""/space"", + ""interactions"": """", + ""processors"": """", + ""groups"": ""Player"", + ""action"": ""Coding"", + ""isComposite"": false, + ""isPartOfComposite"": false + } + ] + } + ], + ""controlSchemes"": [ + { + ""name"": ""Player"", + ""bindingGroup"": ""Player"", + ""devices"": [ + { + ""devicePath"": """", + ""isOptional"": true, + ""isOR"": false + }, + { + ""devicePath"": """", + ""isOptional"": true, + ""isOR"": false + } + ] + } + ] +}"); + // PlayerNormal + m_PlayerNormal = asset.FindActionMap("PlayerNormal", throwIfNotFound: true); + m_PlayerNormal_MoveHorizons = m_PlayerNormal.FindAction("MoveHorizons", throwIfNotFound: true); + m_PlayerNormal_Run = m_PlayerNormal.FindAction("Run", throwIfNotFound: true); + m_PlayerNormal_Interaction = m_PlayerNormal.FindAction("Interaction", throwIfNotFound: true); + m_PlayerNormal_Coding = m_PlayerNormal.FindAction("Coding", 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(); + } + + // PlayerNormal + private readonly InputActionMap m_PlayerNormal; + private IPlayerNormalActions m_PlayerNormalActionsCallbackInterface; + private readonly InputAction m_PlayerNormal_MoveHorizons; + private readonly InputAction m_PlayerNormal_Run; + private readonly InputAction m_PlayerNormal_Interaction; + private readonly InputAction m_PlayerNormal_Coding; + public struct PlayerNormalActions + { + private @Player m_Wrapper; + public PlayerNormalActions(@Player wrapper) { m_Wrapper = wrapper; } + public InputAction @MoveHorizons => m_Wrapper.m_PlayerNormal_MoveHorizons; + public InputAction @Run => m_Wrapper.m_PlayerNormal_Run; + public InputAction @Interaction => m_Wrapper.m_PlayerNormal_Interaction; + public InputAction @Coding => m_Wrapper.m_PlayerNormal_Coding; + public InputActionMap Get() { return m_Wrapper.m_PlayerNormal; } + public void Enable() { Get().Enable(); } + public void Disable() { Get().Disable(); } + public bool enabled => Get().enabled; + public static implicit operator InputActionMap(PlayerNormalActions set) { return set.Get(); } + public void SetCallbacks(IPlayerNormalActions instance) + { + if (m_Wrapper.m_PlayerNormalActionsCallbackInterface != null) + { + @MoveHorizons.started -= m_Wrapper.m_PlayerNormalActionsCallbackInterface.OnMoveHorizons; + @MoveHorizons.performed -= m_Wrapper.m_PlayerNormalActionsCallbackInterface.OnMoveHorizons; + @MoveHorizons.canceled -= m_Wrapper.m_PlayerNormalActionsCallbackInterface.OnMoveHorizons; + @Run.started -= m_Wrapper.m_PlayerNormalActionsCallbackInterface.OnRun; + @Run.performed -= m_Wrapper.m_PlayerNormalActionsCallbackInterface.OnRun; + @Run.canceled -= m_Wrapper.m_PlayerNormalActionsCallbackInterface.OnRun; + @Interaction.started -= m_Wrapper.m_PlayerNormalActionsCallbackInterface.OnInteraction; + @Interaction.performed -= m_Wrapper.m_PlayerNormalActionsCallbackInterface.OnInteraction; + @Interaction.canceled -= m_Wrapper.m_PlayerNormalActionsCallbackInterface.OnInteraction; + @Coding.started -= m_Wrapper.m_PlayerNormalActionsCallbackInterface.OnCoding; + @Coding.performed -= m_Wrapper.m_PlayerNormalActionsCallbackInterface.OnCoding; + @Coding.canceled -= m_Wrapper.m_PlayerNormalActionsCallbackInterface.OnCoding; + } + m_Wrapper.m_PlayerNormalActionsCallbackInterface = instance; + if (instance != null) + { + @MoveHorizons.started += instance.OnMoveHorizons; + @MoveHorizons.performed += instance.OnMoveHorizons; + @MoveHorizons.canceled += instance.OnMoveHorizons; + @Run.started += instance.OnRun; + @Run.performed += instance.OnRun; + @Run.canceled += instance.OnRun; + @Interaction.started += instance.OnInteraction; + @Interaction.performed += instance.OnInteraction; + @Interaction.canceled += instance.OnInteraction; + @Coding.started += instance.OnCoding; + @Coding.performed += instance.OnCoding; + @Coding.canceled += instance.OnCoding; + } + } + } + public PlayerNormalActions @PlayerNormal => new PlayerNormalActions(this); + private int m_PlayerSchemeIndex = -1; + public InputControlScheme PlayerScheme + { + get + { + if (m_PlayerSchemeIndex == -1) m_PlayerSchemeIndex = asset.FindControlSchemeIndex("Player"); + return asset.controlSchemes[m_PlayerSchemeIndex]; + } + } + public interface IPlayerNormalActions + { + void OnMoveHorizons(InputAction.CallbackContext context); + void OnRun(InputAction.CallbackContext context); + void OnInteraction(InputAction.CallbackContext context); + void OnCoding(InputAction.CallbackContext context); + } +} diff --git a/Assets/Player.cs.meta b/Assets/InputAssets/Player.cs.meta similarity index 83% rename from Assets/Player.cs.meta rename to Assets/InputAssets/Player.cs.meta index 0f466a4..e24e53a 100644 --- a/Assets/Player.cs.meta +++ b/Assets/InputAssets/Player.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: f656cd3d2a0f80c45b5af3c7e25a4376 +guid: 3f519a18c3058b34ea0a297f6f81200e MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/InputAssets/Player.inputactions b/Assets/InputAssets/Player.inputactions new file mode 100644 index 0000000..a1f0614 --- /dev/null +++ b/Assets/InputAssets/Player.inputactions @@ -0,0 +1,195 @@ +{ + "name": "Player", + "maps": [ + { + "name": "PlayerNormal", + "id": "fed7b745-1bc5-4e0b-a0e3-12ba77260d19", + "actions": [ + { + "name": "MoveHorizons", + "type": "Value", + "id": "5a93f020-27b4-4cb6-975f-af9ed1ef4ec3", + "expectedControlType": "Axis", + "processors": "", + "interactions": "" + }, + { + "name": "Run", + "type": "Button", + "id": "5c554403-34b9-4a85-a8f5-ac58363cad75", + "expectedControlType": "Button", + "processors": "", + "interactions": "Press(behavior=2)" + }, + { + "name": "Interaction", + "type": "Button", + "id": "a3099043-3ac2-4656-8595-f0c577842621", + "expectedControlType": "Button", + "processors": "", + "interactions": "Press(behavior=2)" + }, + { + "name": "Coding", + "type": "Button", + "id": "f7af9390-5dad-4c80-a4a7-83d8314f8e88", + "expectedControlType": "Button", + "processors": "", + "interactions": "Press(behavior=2)" + } + ], + "bindings": [ + { + "name": "Keyboard", + "id": "1fbfd71c-7027-405d-a1ed-1fc210b6164f", + "path": "1DAxis", + "interactions": "", + "processors": "", + "groups": "", + "action": "MoveHorizons", + "isComposite": true, + "isPartOfComposite": false + }, + { + "name": "negative", + "id": "68266135-01e4-4afc-96c0-ea13a80f3480", + "path": "/a", + "interactions": "", + "processors": "", + "groups": "Player", + "action": "MoveHorizons", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "positive", + "id": "239ae58a-4ed8-4a1c-a712-875cc1a5a00b", + "path": "/d", + "interactions": "", + "processors": "", + "groups": "Player", + "action": "MoveHorizons", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "GamePad", + "id": "fe14fc96-6976-4535-9110-34ee485476e9", + "path": "1DAxis", + "interactions": "", + "processors": "", + "groups": "", + "action": "MoveHorizons", + "isComposite": true, + "isPartOfComposite": false + }, + { + "name": "negative", + "id": "28b72bc6-4f68-4a0a-b630-d71e22d0d6ec", + "path": "/leftStick/left", + "interactions": "", + "processors": "", + "groups": "Player", + "action": "MoveHorizons", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "positive", + "id": "81388851-93e1-42a6-88f8-2eccb63c984d", + "path": "/leftStick/right", + "interactions": "", + "processors": "", + "groups": "Player", + "action": "MoveHorizons", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "", + "id": "b0789a3f-5494-4bae-96bb-36eab3a52419", + "path": "/rightShoulder", + "interactions": "", + "processors": "", + "groups": "Player", + "action": "Run", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "975884c6-576e-4b0b-adb7-f0883ff247e9", + "path": "/shift", + "interactions": "", + "processors": "", + "groups": "Player", + "action": "Run", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "c35dfc0f-020b-4d7f-b2ca-5b54e24145f5", + "path": "/buttonWest", + "interactions": "", + "processors": "", + "groups": "Player", + "action": "Interaction", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "31e28f16-f6f5-4fc1-b9b6-7b1d27b1b051", + "path": "/f", + "interactions": "", + "processors": "", + "groups": "Player", + "action": "Interaction", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "f934f611-8c36-46c6-ac79-b5cb10f172f8", + "path": "/rightTrigger", + "interactions": "", + "processors": "", + "groups": "Player", + "action": "Coding", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "eb88999b-e1c9-4d1e-9b74-683dc913e3a1", + "path": "/space", + "interactions": "", + "processors": "", + "groups": "Player", + "action": "Coding", + "isComposite": false, + "isPartOfComposite": false + } + ] + } + ], + "controlSchemes": [ + { + "name": "Player", + "bindingGroup": "Player", + "devices": [ + { + "devicePath": "", + "isOptional": true, + "isOR": false + }, + { + "devicePath": "", + "isOptional": true, + "isOR": false + } + ] + } + ] +} \ No newline at end of file diff --git a/Assets/InputAssets/Player.inputactions.meta b/Assets/InputAssets/Player.inputactions.meta new file mode 100644 index 0000000..62fc347 --- /dev/null +++ b/Assets/InputAssets/Player.inputactions.meta @@ -0,0 +1,14 @@ +fileFormatVersion: 2 +guid: 6c1186e0febe48c4e866173c0f39422d +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 8404be70184654265930450def6a9037, type: 3} + generateWrapperCode: 1 + wrapperCodePath: + wrapperClassName: + wrapperCodeNamespace: diff --git a/Assets/Samples.meta b/Assets/Samples.meta new file mode 100644 index 0000000..e7dd4fb --- /dev/null +++ b/Assets/Samples.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: bf294f7927f2ea647a75c8a5578b9f90 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Samples/Input System.meta b/Assets/Samples/Input System.meta new file mode 100644 index 0000000..9d0aba0 --- /dev/null +++ b/Assets/Samples/Input System.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b5307e7351753d04f91f1674a29b8c65 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Samples/Input System/1.0.2.meta b/Assets/Samples/Input System/1.0.2.meta new file mode 100644 index 0000000..fbb2d51 --- /dev/null +++ b/Assets/Samples/Input System/1.0.2.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c4657c236dec7054fa42a836630a93ce +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Samples/Input System/1.0.2/Simple Demo.meta b/Assets/Samples/Input System/1.0.2/Simple Demo.meta new file mode 100644 index 0000000..8ff36c3 --- /dev/null +++ b/Assets/Samples/Input System/1.0.2/Simple Demo.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 49c07f3a295b83242a191e36b6712e00 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Samples/Input System/1.0.2/Simple Demo/.sample.json b/Assets/Samples/Input System/1.0.2/Simple Demo/.sample.json new file mode 100644 index 0000000..93bb396 --- /dev/null +++ b/Assets/Samples/Input System/1.0.2/Simple Demo/.sample.json @@ -0,0 +1,4 @@ +{ + "displayName": "Simple Demo", + "description": "A walkthrough of a simple character controller that demonstrates several techniques for working with the input system. See the README.md file in the sample for details." +} diff --git a/Assets/Samples/Input System/1.0.2/Simple Demo/.sample.json.meta b/Assets/Samples/Input System/1.0.2/Simple Demo/.sample.json.meta new file mode 100644 index 0000000..e7791e9 --- /dev/null +++ b/Assets/Samples/Input System/1.0.2/Simple Demo/.sample.json.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 3d9c0d91f50349d29637153ddec7f1d9 +timeCreated: 1565354374 \ No newline at end of file diff --git a/Assets/Samples/Input System/1.0.2/Simple Demo/Environment.prefab b/Assets/Samples/Input System/1.0.2/Simple Demo/Environment.prefab new file mode 100644 index 0000000..de33c32 --- /dev/null +++ b/Assets/Samples/Input System/1.0.2/Simple Demo/Environment.prefab @@ -0,0 +1,590 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &3649407600666749872 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3649407600666749879} + m_Layer: 5 + m_Name: Environment + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &3649407600666749879 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3649407600666749872} + 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_Children: + - {fileID: 3649407600846942369} + - {fileID: 3649407601005238489} + - {fileID: 3649407602124340139} + - {fileID: 3649407601188515013} + - {fileID: 3649407600676317693} + - {fileID: 3649407602089998017} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 512, y: 384} + m_SizeDelta: {x: 100, y: 100} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!1 &3649407600676317694 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3649407600676317693} + - component: {fileID: 3649407600676317666} + - component: {fileID: 3649407600676317667} + - component: {fileID: 3649407600676317692} + m_Layer: 0 + m_Name: Cube (2) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &3649407600676317693 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3649407600676317694} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -501.72, y: -384.79, z: 10.540001} + m_LocalScale: {x: 4.37379, y: 4.37379, z: 4.37379} + m_Children: [] + m_Father: {fileID: 3649407600666749879} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &3649407600676317666 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3649407600676317694} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!65 &3649407600676317667 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3649407600676317694} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &3649407600676317692 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3649407600676317694} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!1 &3649407600846942371 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3649407600846942369} + - component: {fileID: 3649407600846942370} + m_Layer: 0 + m_Name: Directional Light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &3649407600846942369 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3649407600846942371} + m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} + m_LocalPosition: {x: -512, y: -381, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 3649407600666749879} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} +--- !u!108 &3649407600846942370 +Light: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3649407600846942371} + m_Enabled: 1 + serializedVersion: 9 + m_Type: 1 + m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} + m_Intensity: 1 + m_Range: 10 + m_SpotAngle: 30 + m_InnerSpotAngle: 21.802082 + m_CookieSize: 10 + m_Shadows: + m_Type: 2 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_CullingMatrixOverride: + e00: 1 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 1 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 1 + e23: 0 + e30: 0 + e31: 0 + e32: 0 + e33: 1 + m_UseCullingMatrixOverride: 0 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingLayerMask: 1 + m_Lightmapping: 4 + m_LightShadowCasterMode: 0 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} + m_UseBoundingSphereOverride: 0 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!1 &3649407601005238485 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3649407601005238489} + - component: {fileID: 3649407601005238490} + - component: {fileID: 3649407601005238491} + - component: {fileID: 3649407601005238484} + m_Layer: 0 + m_Name: Ground + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &3649407601005238489 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3649407601005238485} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -512, y: -384, z: 0} + m_LocalScale: {x: 25.392921, y: 25.392908, z: 25.392908} + m_Children: [] + m_Father: {fileID: 3649407600666749879} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &3649407601005238490 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3649407601005238485} + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!64 &3649407601005238491 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3649407601005238485} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 3 + m_Convex: 0 + m_CookingOptions: 14 + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &3649407601005238484 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3649407601005238485} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!1 &3649407601188515014 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3649407601188515013} + - component: {fileID: 3649407601188515018} + - component: {fileID: 3649407601188515019} + - component: {fileID: 3649407601188515012} + m_Layer: 0 + m_Name: Cube (1) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &3649407601188515013 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3649407601188515014} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -499.68, y: -383.57, z: -4.46} + m_LocalScale: {x: 4.37379, y: 4.37379, z: 4.37379} + m_Children: [] + m_Father: {fileID: 3649407600666749879} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &3649407601188515018 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3649407601188515014} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!65 &3649407601188515019 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3649407601188515014} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &3649407601188515012 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3649407601188515014} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!1 &3649407602089998018 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3649407602089998017} + - component: {fileID: 3649407602089998022} + - component: {fileID: 3649407602089998023} + - component: {fileID: 3649407602089998016} + m_Layer: 0 + m_Name: Cube (3) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &3649407602089998017 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3649407602089998018} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -540.7, y: -382.5, z: -26.3} + m_LocalScale: {x: 9.755986, y: 9.755985, z: 9.755985} + m_Children: [] + m_Father: {fileID: 3649407600666749879} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &3649407602089998022 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3649407602089998018} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!65 &3649407602089998023 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3649407602089998018} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &3649407602089998016 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3649407602089998018} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!1 &3649407602124340132 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3649407602124340139} + - component: {fileID: 3649407602124340136} + - component: {fileID: 3649407602124340137} + - component: {fileID: 3649407602124340138} + m_Layer: 0 + m_Name: Cube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &3649407602124340139 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3649407602124340132} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -512, y: -381.98, z: 4.3100004} + m_LocalScale: {x: 4.3737917, y: 4.3737917, z: 4.3737917} + m_Children: [] + m_Father: {fileID: 3649407600666749879} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &3649407602124340136 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3649407602124340132} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!65 &3649407602124340137 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3649407602124340132} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &3649407602124340138 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3649407602124340132} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 diff --git a/Assets/Samples/Input System/1.0.2/Simple Demo/Environment.prefab.meta b/Assets/Samples/Input System/1.0.2/Simple Demo/Environment.prefab.meta new file mode 100644 index 0000000..986b75a --- /dev/null +++ b/Assets/Samples/Input System/1.0.2/Simple Demo/Environment.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: b6b5f266028754740b00996b1ad8ce4e +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Samples/Input System/1.0.2/Simple Demo/README.md b/Assets/Samples/Input System/1.0.2/Simple Demo/README.md new file mode 100644 index 0000000..23b325d --- /dev/null +++ b/Assets/Samples/Input System/1.0.2/Simple Demo/README.md @@ -0,0 +1,191 @@ +This sample shows how to set up a simple character controller using the input system. As there is more than one way to do it, the sample illustrates several ways. Each demonstration is set up as a separate scene. The basic functionality in all the scenes is the same. You can move and look around and fire projectiles (colored cubes) into the scene. In some scenes, only gamepads are supported but the more involved demonstrations support several different inputs concurrently. + +# SimpleDemo_UsingState + +[Source](./SimpleController_UsingState.cs) + +This starts off at the lowest level by demonstrating how to wire up input by polling input state directly in a `MonoBehaviour.Update` function. For simplicity's sake it only deals with gamepads but the same mechanism works in equivalent ways for other types of input devices (e.g. using `Mouse.current` and `Keyboard.current`). + +The key APIs demonstrated here are `Gamepad.current` and `InputControl.ReadValue`. + +```CSharp +public class SimpleController_UsingState : MonoBehaviour +{ + //... + + public void Update() + { + var gamepad = Gamepad.current; + if (gamepad == null) + return; + + var move = Gamepad.leftStick.ReadValue(); + //... + } +} +``` + +# SimpleDemo_UsingActions + +[Source](./SimpleController_UsingActions.cs) + +This moves one level higher and moves input over to "input actions". These are input abstractions that allow you to bind to input sources indirectly. + +In this scene, the actions are embedded directly into the character controller component. This allows setting up the bindings for the actions directly in the inspector. To see the actions and their bindings, select the `Player` object in the hierarchy and look at the `SimpleController_UsingActions` component in the inspector. + +The key APIs demonstrated here are `InputAction` and its `Enable`/`Disable` methods and its `ReadValue` method. + +```CSharp +public class SimpleController_UsingActions : MonoBehaviour +{ + public InputAction moveAction; + //... + + public void OnEnable() + { + moveAction.Enable(); + //... + } + + public void OnDisable() + { + moveAction.Disable(); + //... + } + + public void Update() + { + var move = moveAction.ReadValue(); + //... + } +} +``` + +The sample also demonstrates how to use a `Tap` and a `SlowTap` interaction on the fire action to implement a charged shooting mechanism. Note that in this case, we run the firing logic right from within the action using the action's `started`, `performed`, and `canceled` callbacks. + +```CSharp + fireAction.performed += + ctx => + { + if (ctx.interaction is SlowTapInteraction) + { + StartCoroutine(BurstFire((int)(ctx.duration * burstSpeed))); + } + else + { + Fire(); + } + m_Charging = false; + }; + fireAction.started += + ctx => + { + if (ctx.interaction is SlowTapInteraction) + m_Charging = true; + }; + fireAction.canceled += + ctx => + { + m_Charging = false; + }; +``` + +# SimpleDemo_UsingActionAsset + +[Source](./SimpleController_UsingActionAsset.cs) + +As more and more actions are added, it can become quite tedious to manually set up and `Enable` and `Disable` all the actions. We could use an `InputActionMap` in the component like so + +```CSharp +public class SimpleController : MonoBehaviour +{ + public InputActionMap actions; + + public void OnEnable() + { + actions.Enable(); + } + + public void OnDisable() + { + actions.Disable(); + } +} +``` + +but then we would have to look up all the actions manually in the action map. A simpler approach is to put all our actions in a separate asset and generate a C# wrapper class that automatically performs the lookup for us. + +To create such an `.inputactions` asset, right-click in the Project Browser and click `Create >> Input Actions`. To edit the actions, double-click the `.inputactions` asset and a separate window will come up. The asset we use in this example is [SimpleControls.inputactions](SimpleControls.inputactions). + +When you select the asset, note that `Generate C# Class` is ticked in the import settings. This triggers the generation of [SimpleControls.cs](SimpleControls.cs) based on the `.inputactions` file. + +Regarding the `SimpleController_UsingActionAsset` script, there are some notable differences. + +```CSharp +public class SimpleController_UsingActionAsset +{ + // This replaces the InputAction instances we had before with + // the generated C# class. + private SimpleControls m_Controls; + + //... + + public void Awake() + { + // To use the controls, we need to instantiate them. + // This can be done arbitrary many times. E.g. there + // can be multiple players each with its own SimpleControls + // instance. + m_Controls = new SimpleControls(); + + // The generated C# class exposes all the action map + // and actions in the asset by name. Here, we reference + // the `fire` action in the `gameplay` action map, for + // example. + m_Controls.gameplay.fire.performed += + //... + } + + //... + + public void Update() + { + // Same here, we can just look the actions up by name. + var look = m_Controls.gameplay.look.ReadValue(); + var move = m_Controls.gameplay.move.ReadValue(); + + //... + } +} +``` + +Just for kicks, this sample also adds keyboard and mouse control to the game. + +# SimpleDemo_UsingPlayerInput + +[Source](./SimpleController_UsingPlayerInput.cs) + +Finally, we reached the highest level of the input system. While scripting input like in the examples above can be quick and easy, it becomes hard to manage when there can be multiple devices and/or multiple players in the game. This is where `PlayerInput` comes in. + +`PlayerInput` automatically manages per-player device assignments and can also automatically handle control scheme switching in single player (e.g. when the player switches between a gamepad and mouse&keyboard). + +In our case, we're not getting too much out of it since we don't have control schemes or multiple players but still, let's have a look. + +The first thing you'll probably notice is that now there are two script components on the `Player` object, one being the usual `SimpleController` and the other being `PlayerInput`. The latter is what now refers to [SimpleControls.inputactions](SimpleControls.inputactions). It also has `gameplay` set as the `Default Action Map` so that the gameplay actions will get enabled right away when `PlayerInput` itself is enabled. + +For getting callbacks, we have chosen `Invoke Unity Events` as the `Behavior`. If you expand the `Events` foldout in the inspector, you can see that `OnFire`, `OnMove`, and `OnLook` are added to the respective events. Each callback method here looks like the `started`, `performed`, and `canceled` callbacks we've already seen on `fireAction` before. + +```CSharp +public class SimpleController_UsingPlayerInput : MonoBehaviour +{ + private Vector2 m_Move; + //... + + public void OnMove(InputAction.CallbackContext context) + { + m_Move = context.ReadValue(); + } + + //... +} +``` diff --git a/Assets/Samples/Input System/1.0.2/Simple Demo/README.md.meta b/Assets/Samples/Input System/1.0.2/Simple Demo/README.md.meta new file mode 100644 index 0000000..086a776 --- /dev/null +++ b/Assets/Samples/Input System/1.0.2/Simple Demo/README.md.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: ec15dad1b04214281a9b4853b22e16f8 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Samples/Input System/1.0.2/Simple Demo/SimpleController_UsingActionAsset.cs b/Assets/Samples/Input System/1.0.2/Simple Demo/SimpleController_UsingActionAsset.cs new file mode 100644 index 0000000..4e2da50 --- /dev/null +++ b/Assets/Samples/Input System/1.0.2/Simple Demo/SimpleController_UsingActionAsset.cs @@ -0,0 +1,117 @@ +using System.Collections; +using UnityEngine; +using UnityEngine.InputSystem.Interactions; + +// Use action set asset instead of lose InputActions directly on component. +public class SimpleController_UsingActionAsset : MonoBehaviour +{ + public float moveSpeed; + public float rotateSpeed; + public float burstSpeed; + public GameObject projectile; + + private SimpleControls m_Controls; + private bool m_Charging; + private Vector2 m_Rotation; + + public void Awake() + { + m_Controls = new SimpleControls(); + + m_Controls.gameplay.fire.performed += + ctx => + { + if (ctx.interaction is SlowTapInteraction) + { + StartCoroutine(BurstFire((int)(ctx.duration * burstSpeed))); + } + else + { + Fire(); + } + m_Charging = false; + }; + m_Controls.gameplay.fire.started += + ctx => + { + if (ctx.interaction is SlowTapInteraction) + m_Charging = true; + }; + m_Controls.gameplay.fire.canceled += + ctx => + { + m_Charging = false; + }; + } + + public void OnEnable() + { + m_Controls.Enable(); + } + + public void OnDisable() + { + m_Controls.Disable(); + } + + public void OnGUI() + { + if (m_Charging) + GUI.Label(new Rect(100, 100, 200, 100), "Charging..."); + } + + public void Update() + { + var look = m_Controls.gameplay.look.ReadValue(); + var move = m_Controls.gameplay.move.ReadValue(); + + // Update orientation first, then move. Otherwise move orientation will lag + // behind by one frame. + Look(look); + Move(move); + } + + private void Move(Vector2 direction) + { + if (direction.sqrMagnitude < 0.01) + return; + var scaledMoveSpeed = moveSpeed * Time.deltaTime; + // For simplicity's sake, we just keep movement in a single plane here. Rotate + // direction according to world Y rotation of player. + var move = Quaternion.Euler(0, transform.eulerAngles.y, 0) * new Vector3(direction.x, 0, direction.y); + transform.position += move * scaledMoveSpeed; + } + + private void Look(Vector2 rotate) + { + if (rotate.sqrMagnitude < 0.01) + return; + var scaledRotateSpeed = rotateSpeed * Time.deltaTime; + m_Rotation.y += rotate.x * scaledRotateSpeed; + m_Rotation.x = Mathf.Clamp(m_Rotation.x - rotate.y * scaledRotateSpeed, -89, 89); + transform.localEulerAngles = m_Rotation; + } + + private IEnumerator BurstFire(int burstAmount) + { + for (var i = 0; i < burstAmount; ++i) + { + Fire(); + yield return new WaitForSeconds(0.1f); + } + } + + private void Fire() + { + var transform = this.transform; + var newProjectile = Instantiate(projectile); + newProjectile.transform.position = transform.position + transform.forward * 0.6f; + newProjectile.transform.rotation = transform.rotation; + const int size = 1; + newProjectile.transform.localScale *= size; + newProjectile.GetComponent().mass = Mathf.Pow(size, 3); + newProjectile.GetComponent().AddForce(transform.forward * 20f, ForceMode.Impulse); + newProjectile.GetComponent().material.color = + new Color(Random.value, Random.value, Random.value, 1.0f); + } +} diff --git a/Assets/Samples/Input System/1.0.2/Simple Demo/SimpleController_UsingActionAsset.cs.meta b/Assets/Samples/Input System/1.0.2/Simple Demo/SimpleController_UsingActionAsset.cs.meta new file mode 100644 index 0000000..684795e --- /dev/null +++ b/Assets/Samples/Input System/1.0.2/Simple Demo/SimpleController_UsingActionAsset.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 092bf3b983af64d85be968602701f933 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Samples/Input System/1.0.2/Simple Demo/SimpleController_UsingActions.cs b/Assets/Samples/Input System/1.0.2/Simple Demo/SimpleController_UsingActions.cs new file mode 100644 index 0000000..c880c83 --- /dev/null +++ b/Assets/Samples/Input System/1.0.2/Simple Demo/SimpleController_UsingActions.cs @@ -0,0 +1,128 @@ +using System.Collections; +using UnityEngine.InputSystem; +using UnityEngine; +using UnityEngine.InputSystem.Interactions; + +// Using simple actions with callbacks. +public class SimpleController_UsingActions : MonoBehaviour +{ + public float moveSpeed; + public float rotateSpeed; + public float burstSpeed; + public GameObject projectile; + + public InputAction moveAction; + public InputAction lookAction; + public InputAction fireAction; + + private bool m_Charging; + + private Vector2 m_Rotation; + + public void Awake() + { + // We could use `fireAction.triggered` in Update() but that makes it more difficult to + // implement the charging mechanism. So instead we use the `started`, `performed`, and + // `canceled` callbacks to run the firing logic right from within the action. + + fireAction.performed += + ctx => + { + if (ctx.interaction is SlowTapInteraction) + { + StartCoroutine(BurstFire((int)(ctx.duration * burstSpeed))); + } + else + { + Fire(); + } + m_Charging = false; + }; + fireAction.started += + ctx => + { + if (ctx.interaction is SlowTapInteraction) + m_Charging = true; + }; + fireAction.canceled += + ctx => + { + m_Charging = false; + }; + } + + public void OnEnable() + { + moveAction.Enable(); + lookAction.Enable(); + fireAction.Enable(); + } + + public void OnDisable() + { + moveAction.Disable(); + lookAction.Disable(); + fireAction.Disable(); + } + + public void OnGUI() + { + if (m_Charging) + GUI.Label(new Rect(100, 100, 200, 100), "Charging..."); + } + + public void Update() + { + var look = lookAction.ReadValue(); + var move = moveAction.ReadValue(); + + // Update orientation first, then move. Otherwise move orientation will lag + // behind by one frame. + Look(look); + Move(move); + } + + private void Move(Vector2 direction) + { + if (direction.sqrMagnitude < 0.01) + return; + var scaledMoveSpeed = moveSpeed * Time.deltaTime; + // For simplicity's sake, we just keep movement in a single plane here. Rotate + // direction according to world Y rotation of player. + var move = Quaternion.Euler(0, transform.eulerAngles.y, 0) * new Vector3(direction.x, 0, direction.y); + transform.position += move * scaledMoveSpeed; + } + + private void Look(Vector2 rotate) + { + if (rotate.sqrMagnitude < 0.01) + return; + var scaledRotateSpeed = rotateSpeed * Time.deltaTime; + m_Rotation.y += rotate.x * scaledRotateSpeed; + m_Rotation.x = Mathf.Clamp(m_Rotation.x - rotate.y * scaledRotateSpeed, -89, 89); + transform.localEulerAngles = m_Rotation; + } + + private IEnumerator BurstFire(int burstAmount) + { + for (var i = 0; i < burstAmount; ++i) + { + Fire(); + yield return new WaitForSeconds(0.1f); + } + } + + private void Fire() + { + var transform = this.transform; + var newProjectile = Instantiate(projectile); + newProjectile.transform.position = transform.position + transform.forward * 0.6f; + newProjectile.transform.rotation = transform.rotation; + var size = 1; + newProjectile.transform.localScale *= size; + newProjectile.GetComponent().mass = Mathf.Pow(size, 3); + newProjectile.GetComponent().AddForce(transform.forward * 20f, ForceMode.Impulse); + newProjectile.GetComponent().material.color = + new Color(Random.value, Random.value, Random.value, 1.0f); + } +} diff --git a/Assets/Samples/Input System/1.0.2/Simple Demo/SimpleController_UsingActions.cs.meta b/Assets/Samples/Input System/1.0.2/Simple Demo/SimpleController_UsingActions.cs.meta new file mode 100644 index 0000000..96e8db4 --- /dev/null +++ b/Assets/Samples/Input System/1.0.2/Simple Demo/SimpleController_UsingActions.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 2ab7c7a7ef9e44f4d8c56e49c8bfed8f +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Samples/Input System/1.0.2/Simple Demo/SimpleController_UsingPlayerInput.cs b/Assets/Samples/Input System/1.0.2/Simple Demo/SimpleController_UsingPlayerInput.cs new file mode 100644 index 0000000..5b589e6 --- /dev/null +++ b/Assets/Samples/Input System/1.0.2/Simple Demo/SimpleController_UsingPlayerInput.cs @@ -0,0 +1,113 @@ +using System.Collections; +using UnityEngine; +using UnityEngine.InputSystem; +using UnityEngine.InputSystem.Interactions; + +// Use a separate PlayerInput component for setting up input. +public class SimpleController_UsingPlayerInput : MonoBehaviour +{ + public float moveSpeed; + public float rotateSpeed; + public float burstSpeed; + public GameObject projectile; + + private bool m_Charging; + private Vector2 m_Rotation; + private Vector2 m_Look; + private Vector2 m_Move; + + public void OnMove(InputAction.CallbackContext context) + { + m_Move = context.ReadValue(); + } + + public void OnLook(InputAction.CallbackContext context) + { + m_Look = context.ReadValue(); + } + + public void OnFire(InputAction.CallbackContext context) + { + switch (context.phase) + { + case InputActionPhase.Performed: + if (context.interaction is SlowTapInteraction) + { + StartCoroutine(BurstFire((int)(context.duration * burstSpeed))); + } + else + { + Fire(); + } + m_Charging = false; + break; + + case InputActionPhase.Started: + if (context.interaction is SlowTapInteraction) + m_Charging = true; + break; + + case InputActionPhase.Canceled: + m_Charging = false; + break; + } + } + + public void OnGUI() + { + if (m_Charging) + GUI.Label(new Rect(100, 100, 200, 100), "Charging..."); + } + + public void Update() + { + // Update orientation first, then move. Otherwise move orientation will lag + // behind by one frame. + Look(m_Look); + Move(m_Move); + } + + private void Move(Vector2 direction) + { + if (direction.sqrMagnitude < 0.01) + return; + var scaledMoveSpeed = moveSpeed * Time.deltaTime; + // For simplicity's sake, we just keep movement in a single plane here. Rotate + // direction according to world Y rotation of player. + var move = Quaternion.Euler(0, transform.eulerAngles.y, 0) * new Vector3(direction.x, 0, direction.y); + transform.position += move * scaledMoveSpeed; + } + + private void Look(Vector2 rotate) + { + if (rotate.sqrMagnitude < 0.01) + return; + var scaledRotateSpeed = rotateSpeed * Time.deltaTime; + m_Rotation.y += rotate.x * scaledRotateSpeed; + m_Rotation.x = Mathf.Clamp(m_Rotation.x - rotate.y * scaledRotateSpeed, -89, 89); + transform.localEulerAngles = m_Rotation; + } + + private IEnumerator BurstFire(int burstAmount) + { + for (var i = 0; i < burstAmount; ++i) + { + Fire(); + yield return new WaitForSeconds(0.1f); + } + } + + private void Fire() + { + var transform = this.transform; + var newProjectile = Instantiate(projectile); + newProjectile.transform.position = transform.position + transform.forward * 0.6f; + newProjectile.transform.rotation = transform.rotation; + const int size = 1; + newProjectile.transform.localScale *= size; + newProjectile.GetComponent().mass = Mathf.Pow(size, 3); + newProjectile.GetComponent().AddForce(transform.forward * 20f, ForceMode.Impulse); + newProjectile.GetComponent().material.color = + new Color(Random.value, Random.value, Random.value, 1.0f); + } +} diff --git a/Assets/Samples/Input System/1.0.2/Simple Demo/SimpleController_UsingPlayerInput.cs.meta b/Assets/Samples/Input System/1.0.2/Simple Demo/SimpleController_UsingPlayerInput.cs.meta new file mode 100644 index 0000000..c4ca38c --- /dev/null +++ b/Assets/Samples/Input System/1.0.2/Simple Demo/SimpleController_UsingPlayerInput.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 0923a5a14f884859a39872d225d9c72b +timeCreated: 1565353371 \ No newline at end of file diff --git a/Assets/Samples/Input System/1.0.2/Simple Demo/SimpleController_UsingState.cs b/Assets/Samples/Input System/1.0.2/Simple Demo/SimpleController_UsingState.cs new file mode 100644 index 0000000..fb24c75 --- /dev/null +++ b/Assets/Samples/Input System/1.0.2/Simple Demo/SimpleController_UsingState.cs @@ -0,0 +1,78 @@ +using UnityEngine.InputSystem; +using UnityEngine; + +// Using state of gamepad device directly. +public class SimpleController_UsingState : MonoBehaviour +{ + public float moveSpeed; + public float rotateSpeed; + public GameObject projectile; + + private Vector2 m_Rotation; + private bool m_Firing; + private float m_FireCooldown; + + public void Update() + { + var gamepad = Gamepad.current; + if (gamepad == null) + return; + + var leftStick = gamepad.leftStick.ReadValue(); + var rightStick = gamepad.rightStick.ReadValue(); + + Look(rightStick); + Move(leftStick); + + if (gamepad.buttonSouth.wasPressedThisFrame) + { + m_Firing = true; + m_FireCooldown = 0; + } + else if (gamepad.buttonSouth.wasReleasedThisFrame) + { + m_Firing = false; + } + + if (m_Firing && m_FireCooldown < Time.time) + { + Fire(); + m_FireCooldown = Time.time + 0.1f; + } + } + + private void Move(Vector2 direction) + { + if (direction.sqrMagnitude < 0.01) + return; + var scaledMoveSpeed = moveSpeed * Time.deltaTime; + // For simplicity's sake, we just keep movement in a single plane here. Rotate + // direction according to world Y rotation of player. + var move = Quaternion.Euler(0, transform.eulerAngles.y, 0) * new Vector3(direction.x, 0, direction.y); + transform.position += move * scaledMoveSpeed; + } + + private void Look(Vector2 rotate) + { + if (rotate.sqrMagnitude < 0.01) + return; + var scaledRotateSpeed = rotateSpeed * Time.deltaTime; + m_Rotation.y += rotate.x * scaledRotateSpeed; + m_Rotation.x = Mathf.Clamp(m_Rotation.x - rotate.y * scaledRotateSpeed, -89, 89); + transform.localEulerAngles = m_Rotation; + } + + private void Fire() + { + var transform = this.transform; + var newProjectile = Instantiate(projectile); + newProjectile.transform.position = transform.position + transform.forward * 0.6f; + newProjectile.transform.rotation = transform.rotation; + const int size = 1; + newProjectile.transform.localScale *= size; + newProjectile.GetComponent().mass = Mathf.Pow(size, 3); + newProjectile.GetComponent().AddForce(transform.forward * 20f, ForceMode.Impulse); + newProjectile.GetComponent().material.color = + new Color(Random.value, Random.value, Random.value, 1.0f); + } +} diff --git a/Assets/Samples/Input System/1.0.2/Simple Demo/SimpleController_UsingState.cs.meta b/Assets/Samples/Input System/1.0.2/Simple Demo/SimpleController_UsingState.cs.meta new file mode 100644 index 0000000..7995f30 --- /dev/null +++ b/Assets/Samples/Input System/1.0.2/Simple Demo/SimpleController_UsingState.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 6530e5fa6e7bd4c9d99219c476807b5e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Samples/Input System/1.0.2/Simple Demo/SimpleControls.cs b/Assets/Samples/Input System/1.0.2/Simple Demo/SimpleControls.cs new file mode 100644 index 0000000..a16f658 --- /dev/null +++ b/Assets/Samples/Input System/1.0.2/Simple Demo/SimpleControls.cs @@ -0,0 +1,256 @@ +// GENERATED AUTOMATICALLY FROM 'Assets/Samples/Input System/1.0.2/Simple Demo/SimpleControls.inputactions' + +using System; +using System.Collections; +using System.Collections.Generic; +using UnityEngine.InputSystem; +using UnityEngine.InputSystem.Utilities; + +public class @SimpleControls : IInputActionCollection, IDisposable +{ + public InputActionAsset asset { get; } + public @SimpleControls() + { + asset = InputActionAsset.FromJson(@"{ + ""name"": ""SimpleControls"", + ""maps"": [ + { + ""name"": ""gameplay"", + ""id"": ""265c38f5-dd18-4d34-b198-aec58e1627ff"", + ""actions"": [ + { + ""name"": ""fire"", + ""type"": ""Button"", + ""id"": ""1077f913-a9f9-41b1-acb3-b9ee0adbc744"", + ""expectedControlType"": ""Button"", + ""processors"": """", + ""interactions"": ""Tap,SlowTap"" + }, + { + ""name"": ""move"", + ""type"": ""Value"", + ""id"": ""50fd2809-3aa3-4a90-988e-1facf6773553"", + ""expectedControlType"": ""Vector2"", + ""processors"": """", + ""interactions"": """" + }, + { + ""name"": ""look"", + ""type"": ""Value"", + ""id"": ""c60e0974-d140-4597-a40e-9862193067e9"", + ""expectedControlType"": ""Vector2"", + ""processors"": """", + ""interactions"": """" + } + ], + ""bindings"": [ + { + ""name"": """", + ""id"": ""abb776f3-f329-4f7b-bbf8-b577d13be018"", + ""path"": ""*/{PrimaryAction}"", + ""interactions"": """", + ""processors"": """", + ""groups"": """", + ""action"": ""fire"", + ""isComposite"": false, + ""isPartOfComposite"": false + }, + { + ""name"": """", + ""id"": ""e1b8c4dd-7b3a-4db6-a93a-0889b59b1afc"", + ""path"": ""/leftStick"", + ""interactions"": """", + ""processors"": """", + ""groups"": """", + ""action"": ""move"", + ""isComposite"": false, + ""isPartOfComposite"": false + }, + { + ""name"": ""Dpad"", + ""id"": ""cefc16fc-557a-44b0-939f-2ad792876b07"", + ""path"": ""Dpad"", + ""interactions"": """", + ""processors"": """", + ""groups"": """", + ""action"": ""move"", + ""isComposite"": true, + ""isPartOfComposite"": false + }, + { + ""name"": ""up"", + ""id"": ""07244659-79df-461d-b329-defbe2fbc5f6"", + ""path"": ""/w"", + ""interactions"": """", + ""processors"": """", + ""groups"": """", + ""action"": ""move"", + ""isComposite"": false, + ""isPartOfComposite"": true + }, + { + ""name"": ""down"", + ""id"": ""f0ec75cb-f02c-40d2-a33f-1fd6eab2ae0b"", + ""path"": ""/s"", + ""interactions"": """", + ""processors"": """", + ""groups"": """", + ""action"": ""move"", + ""isComposite"": false, + ""isPartOfComposite"": true + }, + { + ""name"": ""left"", + ""id"": ""21fe6bfe-4721-4483-9f4a-a0031ade105c"", + ""path"": ""/a"", + ""interactions"": """", + ""processors"": """", + ""groups"": """", + ""action"": ""move"", + ""isComposite"": false, + ""isPartOfComposite"": true + }, + { + ""name"": ""right"", + ""id"": ""2dd39746-c75c-4a11-838a-e59eacaf4e0b"", + ""path"": ""/d"", + ""interactions"": """", + ""processors"": """", + ""groups"": """", + ""action"": ""move"", + ""isComposite"": false, + ""isPartOfComposite"": true + }, + { + ""name"": """", + ""id"": ""c106d6e6-2780-47ff-b318-396171bd54cc"", + ""path"": ""/rightStick"", + ""interactions"": """", + ""processors"": """", + ""groups"": """", + ""action"": ""look"", + ""isComposite"": false, + ""isPartOfComposite"": false + }, + { + ""name"": """", + ""id"": ""578caa03-6827-4797-adfc-a59770c437fe"", + ""path"": ""/delta"", + ""interactions"": """", + ""processors"": ""ScaleVector2(x=2,y=2)"", + ""groups"": """", + ""action"": ""look"", + ""isComposite"": false, + ""isPartOfComposite"": false + } + ] + } + ], + ""controlSchemes"": [] +}"); + // gameplay + m_gameplay = asset.FindActionMap("gameplay", throwIfNotFound: true); + m_gameplay_fire = m_gameplay.FindAction("fire", throwIfNotFound: true); + m_gameplay_move = m_gameplay.FindAction("move", throwIfNotFound: true); + m_gameplay_look = m_gameplay.FindAction("look", 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(); + } + + // gameplay + private readonly InputActionMap m_gameplay; + private IGameplayActions m_GameplayActionsCallbackInterface; + private readonly InputAction m_gameplay_fire; + private readonly InputAction m_gameplay_move; + private readonly InputAction m_gameplay_look; + public struct GameplayActions + { + private @SimpleControls m_Wrapper; + public GameplayActions(@SimpleControls wrapper) { m_Wrapper = wrapper; } + public InputAction @fire => m_Wrapper.m_gameplay_fire; + public InputAction @move => m_Wrapper.m_gameplay_move; + public InputAction @look => m_Wrapper.m_gameplay_look; + public InputActionMap Get() { return m_Wrapper.m_gameplay; } + public void Enable() { Get().Enable(); } + public void Disable() { Get().Disable(); } + public bool enabled => Get().enabled; + public static implicit operator InputActionMap(GameplayActions set) { return set.Get(); } + public void SetCallbacks(IGameplayActions instance) + { + if (m_Wrapper.m_GameplayActionsCallbackInterface != null) + { + @fire.started -= m_Wrapper.m_GameplayActionsCallbackInterface.OnFire; + @fire.performed -= m_Wrapper.m_GameplayActionsCallbackInterface.OnFire; + @fire.canceled -= m_Wrapper.m_GameplayActionsCallbackInterface.OnFire; + @move.started -= m_Wrapper.m_GameplayActionsCallbackInterface.OnMove; + @move.performed -= m_Wrapper.m_GameplayActionsCallbackInterface.OnMove; + @move.canceled -= m_Wrapper.m_GameplayActionsCallbackInterface.OnMove; + @look.started -= m_Wrapper.m_GameplayActionsCallbackInterface.OnLook; + @look.performed -= m_Wrapper.m_GameplayActionsCallbackInterface.OnLook; + @look.canceled -= m_Wrapper.m_GameplayActionsCallbackInterface.OnLook; + } + m_Wrapper.m_GameplayActionsCallbackInterface = instance; + if (instance != null) + { + @fire.started += instance.OnFire; + @fire.performed += instance.OnFire; + @fire.canceled += instance.OnFire; + @move.started += instance.OnMove; + @move.performed += instance.OnMove; + @move.canceled += instance.OnMove; + @look.started += instance.OnLook; + @look.performed += instance.OnLook; + @look.canceled += instance.OnLook; + } + } + } + public GameplayActions @gameplay => new GameplayActions(this); + public interface IGameplayActions + { + void OnFire(InputAction.CallbackContext context); + void OnMove(InputAction.CallbackContext context); + void OnLook(InputAction.CallbackContext context); + } +} diff --git a/Assets/Samples/Input System/1.0.2/Simple Demo/SimpleControls.cs.meta b/Assets/Samples/Input System/1.0.2/Simple Demo/SimpleControls.cs.meta new file mode 100644 index 0000000..e6ff8e7 --- /dev/null +++ b/Assets/Samples/Input System/1.0.2/Simple Demo/SimpleControls.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 8766f394ba19844a3845c24c45713052 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Samples/Input System/1.0.2/Simple Demo/SimpleControls.inputactions b/Assets/Samples/Input System/1.0.2/Simple Demo/SimpleControls.inputactions new file mode 100644 index 0000000..15e9e58 --- /dev/null +++ b/Assets/Samples/Input System/1.0.2/Simple Demo/SimpleControls.inputactions @@ -0,0 +1,137 @@ +{ + "name": "SimpleControls", + "maps": [ + { + "name": "gameplay", + "id": "265c38f5-dd18-4d34-b198-aec58e1627ff", + "actions": [ + { + "name": "fire", + "type": "Button", + "id": "1077f913-a9f9-41b1-acb3-b9ee0adbc744", + "expectedControlType": "Button", + "processors": "", + "interactions": "Tap,SlowTap" + }, + { + "name": "move", + "type": "Value", + "id": "50fd2809-3aa3-4a90-988e-1facf6773553", + "expectedControlType": "Vector2", + "processors": "", + "interactions": "" + }, + { + "name": "look", + "type": "Value", + "id": "c60e0974-d140-4597-a40e-9862193067e9", + "expectedControlType": "Vector2", + "processors": "", + "interactions": "" + } + ], + "bindings": [ + { + "name": "", + "id": "abb776f3-f329-4f7b-bbf8-b577d13be018", + "path": "*/{PrimaryAction}", + "interactions": "", + "processors": "", + "groups": "", + "action": "fire", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "e1b8c4dd-7b3a-4db6-a93a-0889b59b1afc", + "path": "/leftStick", + "interactions": "", + "processors": "", + "groups": "", + "action": "move", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "Dpad", + "id": "cefc16fc-557a-44b0-939f-2ad792876b07", + "path": "Dpad", + "interactions": "", + "processors": "", + "groups": "", + "action": "move", + "isComposite": true, + "isPartOfComposite": false + }, + { + "name": "up", + "id": "07244659-79df-461d-b329-defbe2fbc5f6", + "path": "/w", + "interactions": "", + "processors": "", + "groups": "", + "action": "move", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "down", + "id": "f0ec75cb-f02c-40d2-a33f-1fd6eab2ae0b", + "path": "/s", + "interactions": "", + "processors": "", + "groups": "", + "action": "move", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "left", + "id": "21fe6bfe-4721-4483-9f4a-a0031ade105c", + "path": "/a", + "interactions": "", + "processors": "", + "groups": "", + "action": "move", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "right", + "id": "2dd39746-c75c-4a11-838a-e59eacaf4e0b", + "path": "/d", + "interactions": "", + "processors": "", + "groups": "", + "action": "move", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "", + "id": "c106d6e6-2780-47ff-b318-396171bd54cc", + "path": "/rightStick", + "interactions": "", + "processors": "", + "groups": "", + "action": "look", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "578caa03-6827-4797-adfc-a59770c437fe", + "path": "/delta", + "interactions": "", + "processors": "ScaleVector2(x=2,y=2)", + "groups": "", + "action": "look", + "isComposite": false, + "isPartOfComposite": false + } + ] + } + ], + "controlSchemes": [] +} \ No newline at end of file diff --git a/Assets/Samples/Input System/1.0.2/Simple Demo/SimpleControls.inputactions.meta b/Assets/Samples/Input System/1.0.2/Simple Demo/SimpleControls.inputactions.meta new file mode 100644 index 0000000..61d875a --- /dev/null +++ b/Assets/Samples/Input System/1.0.2/Simple Demo/SimpleControls.inputactions.meta @@ -0,0 +1,14 @@ +fileFormatVersion: 2 +guid: 97210cd740af04df697b1fa71c9c9623 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 8404be70184654265930450def6a9037, type: 3} + generateWrapperCode: 1 + wrapperCodePath: + wrapperClassName: SimpleControls + wrapperCodeNamespace: diff --git a/Assets/Samples/Input System/1.0.2/Simple Demo/SimpleDemo_UsingActionAsset.unity b/Assets/Samples/Input System/1.0.2/Simple Demo/SimpleDemo_UsingActionAsset.unity new file mode 100644 index 0000000..bc608fd --- /dev/null +++ b/Assets/Samples/Input System/1.0.2/Simple Demo/SimpleDemo_UsingActionAsset.unity @@ -0,0 +1,333 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +OcclusionCullingSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 + m_SceneGUID: 00000000000000000000000000000000 + m_OcclusionCullingData: {fileID: 0} +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 9 + m_Fog: 0 + m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + m_FogMode: 3 + m_FogDensity: 0.01 + m_LinearFogStart: 0 + m_LinearFogEnd: 300 + m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} + m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} + m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 0 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} + m_HaloStrength: 0.5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 1 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 0} + m_IndirectSpecularColor: {r: 0.44657856, g: 0.49641234, b: 0.57481724, a: 1} + m_UseRadianceAmbientProbe: 0 +--- !u!157 &3 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 11 + m_GIWorkflowMode: 0 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 1 + m_LightmapEditorSettings: + serializedVersion: 12 + m_Resolution: 2 + m_BakeResolution: 40 + m_AtlasSize: 1024 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_ExtractAmbientOcclusion: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 1 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 2 + m_BakeBackend: 0 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVRBounces: 2 + m_PVREnvironmentSampleCount: 500 + m_PVREnvironmentReferencePointCount: 2048 + m_PVRFilteringMode: 2 + m_PVRDenoiserTypeDirect: 0 + m_PVRDenoiserTypeIndirect: 0 + m_PVRDenoiserTypeAO: 0 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVREnvironmentMIS: 0 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ShowResolutionOverlay: 1 + m_ExportTrainingData: 0 + m_LightingDataAsset: {fileID: 0} + m_UseShadowmask: 1 +--- !u!196 &4 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.16666667 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} +--- !u!1001 &3649407600332409107 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 3649407600666749872, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_Name + value: Environment + objectReference: {fileID: 0} + - target: {fileID: 3649407600666749879, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3649407600666749879, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3649407600666749879, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3649407600666749879, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 3649407600666749879, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 3649407600666749879, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 3649407600666749879, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3649407600666749879, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_RootOrder + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3649407600666749879, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3649407600666749879, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3649407600666749879, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3649407600666749879, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 512 + objectReference: {fileID: 0} + - target: {fileID: 3649407600666749879, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_AnchoredPosition.y + value: 384 + objectReference: {fileID: 0} + - target: {fileID: 3649407600666749879, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_SizeDelta.x + value: 100 + objectReference: {fileID: 0} + - target: {fileID: 3649407600666749879, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_SizeDelta.y + value: 100 + objectReference: {fileID: 0} + - target: {fileID: 3649407600666749879, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_AnchorMin.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 3649407600666749879, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_AnchorMin.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 3649407600666749879, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_AnchorMax.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 3649407600666749879, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_AnchorMax.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 3649407600666749879, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_Pivot.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 3649407600666749879, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_Pivot.y + value: 0.5 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: b6b5f266028754740b00996b1ad8ce4e, type: 3} +--- !u!1 &7279796982563314049 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7283255547635044647} + - component: {fileID: 7298693803741327381} + - component: {fileID: 7279796982563314051} + m_Layer: 0 + m_Name: Player + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &7279796982563314051 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7279796982563314049} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 092bf3b983af64d85be968602701f933, type: 3} + m_Name: + m_EditorClassIdentifier: + moveSpeed: 10 + rotateSpeed: 60 + burstSpeed: 10 + jumpForce: 2 + projectile: {fileID: 1050929111787496, guid: 4be9e6cdd2d5d499ca5c16cc83fdf790, type: 3} +--- !u!4 &7283255547635044647 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7279796982563314049} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 1, z: -10} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!20 &7298693803741327381 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7279796982563314049} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} + m_projectionMatrixMode: 1 + m_GateFitMode: 2 + m_FOVAxisMode: 0 + m_SensorSize: {x: 36, y: 24} + m_LensShift: {x: 0, y: 0} + m_FocalLength: 50 + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.3 + far clip plane: 1000 + field of view: 60 + orthographic: 0 + orthographic size: 5 + m_Depth: -1 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 1 + m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 diff --git a/Assets/Samples/Input System/1.0.2/Simple Demo/SimpleDemo_UsingActionAsset.unity.meta b/Assets/Samples/Input System/1.0.2/Simple Demo/SimpleDemo_UsingActionAsset.unity.meta new file mode 100644 index 0000000..a23152a --- /dev/null +++ b/Assets/Samples/Input System/1.0.2/Simple Demo/SimpleDemo_UsingActionAsset.unity.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: e363a7a3b19f9476eafd671062b7b491 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Samples/Input System/1.0.2/Simple Demo/SimpleDemo_UsingActions.unity b/Assets/Samples/Input System/1.0.2/Simple Demo/SimpleDemo_UsingActions.unity new file mode 100644 index 0000000..8823a2f --- /dev/null +++ b/Assets/Samples/Input System/1.0.2/Simple Demo/SimpleDemo_UsingActions.unity @@ -0,0 +1,380 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +OcclusionCullingSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 + m_SceneGUID: 00000000000000000000000000000000 + m_OcclusionCullingData: {fileID: 0} +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 9 + m_Fog: 0 + m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + m_FogMode: 3 + m_FogDensity: 0.01 + m_LinearFogStart: 0 + m_LinearFogEnd: 300 + m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} + m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} + m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 0 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} + m_HaloStrength: 0.5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 1 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 0} + m_IndirectSpecularColor: {r: 0.44657856, g: 0.49641234, b: 0.57481724, a: 1} + m_UseRadianceAmbientProbe: 0 +--- !u!157 &3 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 11 + m_GIWorkflowMode: 0 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 1 + m_LightmapEditorSettings: + serializedVersion: 12 + m_Resolution: 2 + m_BakeResolution: 40 + m_AtlasSize: 1024 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_ExtractAmbientOcclusion: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 1 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 2 + m_BakeBackend: 0 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVRBounces: 2 + m_PVREnvironmentSampleCount: 500 + m_PVREnvironmentReferencePointCount: 2048 + m_PVRFilteringMode: 2 + m_PVRDenoiserTypeDirect: 0 + m_PVRDenoiserTypeIndirect: 0 + m_PVRDenoiserTypeAO: 0 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVREnvironmentMIS: 0 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ShowResolutionOverlay: 1 + m_ExportTrainingData: 0 + m_LightingDataAsset: {fileID: 0} + m_UseShadowmask: 1 +--- !u!196 &4 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.16666667 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} +--- !u!1001 &3649407600332409107 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 3649407600666749872, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_Name + value: Environment + objectReference: {fileID: 0} + - target: {fileID: 3649407600666749879, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3649407600666749879, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3649407600666749879, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3649407600666749879, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 3649407600666749879, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 3649407600666749879, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 3649407600666749879, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3649407600666749879, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_RootOrder + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3649407600666749879, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3649407600666749879, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3649407600666749879, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3649407600666749879, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 512 + objectReference: {fileID: 0} + - target: {fileID: 3649407600666749879, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_AnchoredPosition.y + value: 384 + objectReference: {fileID: 0} + - target: {fileID: 3649407600666749879, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_SizeDelta.x + value: 100 + objectReference: {fileID: 0} + - target: {fileID: 3649407600666749879, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_SizeDelta.y + value: 100 + objectReference: {fileID: 0} + - target: {fileID: 3649407600666749879, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_AnchorMin.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 3649407600666749879, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_AnchorMin.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 3649407600666749879, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_AnchorMax.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 3649407600666749879, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_AnchorMax.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 3649407600666749879, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_Pivot.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 3649407600666749879, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_Pivot.y + value: 0.5 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: b6b5f266028754740b00996b1ad8ce4e, type: 3} +--- !u!1 &7279796982563314049 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7283255547635044647} + - component: {fileID: 7298693803741327381} + - component: {fileID: 7279796982563314050} + m_Layer: 0 + m_Name: Player + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &7279796982563314050 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7279796982563314049} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 2ab7c7a7ef9e44f4d8c56e49c8bfed8f, type: 3} + m_Name: + m_EditorClassIdentifier: + moveSpeed: 10 + rotateSpeed: 60 + burstSpeed: 10 + projectile: {fileID: 1050929111787496, guid: 4be9e6cdd2d5d499ca5c16cc83fdf790, type: 3} + moveAction: + m_Name: Move + m_Type: 0 + m_ExpectedControlType: Vector2 + m_Id: 0a9c898e-0d8f-4c2c-9662-f582c9d3dd06 + m_Processors: + m_Interactions: + m_SingletonActionBindings: + - m_Name: + m_Id: 84bc2a32-af42-4e6d-8aaf-e9da78dc32fa + m_Path: /leftStick + m_Interactions: + m_Processors: + m_Groups: + m_Action: Move + m_Flags: 0 + lookAction: + m_Name: Look + m_Type: 0 + m_ExpectedControlType: Vector2 + m_Id: 421525b1-6693-4a7b-a6f1-9b8ad013418c + m_Processors: + m_Interactions: + m_SingletonActionBindings: + - m_Name: + m_Id: c7e7b8fe-23f9-401e-9bc3-058e606745df + m_Path: /rightStick + m_Interactions: + m_Processors: + m_Groups: + m_Action: Look + m_Flags: 0 + fireAction: + m_Name: Fire + m_Type: 1 + m_ExpectedControlType: Button + m_Id: f826c85c-1535-4849-96ce-35551102843b + m_Processors: + m_Interactions: Tap,SlowTap + m_SingletonActionBindings: + - m_Name: + m_Id: e9e2ed90-852c-44cc-a897-7e540eb71429 + m_Path: /buttonSouth + m_Interactions: + m_Processors: + m_Groups: + m_Action: Fire + m_Flags: 0 +--- !u!4 &7283255547635044647 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7279796982563314049} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 1, z: -10} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!20 &7298693803741327381 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7279796982563314049} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} + m_projectionMatrixMode: 1 + m_GateFitMode: 2 + m_FOVAxisMode: 0 + m_SensorSize: {x: 36, y: 24} + m_LensShift: {x: 0, y: 0} + m_FocalLength: 50 + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.3 + far clip plane: 1000 + field of view: 60 + orthographic: 0 + orthographic size: 5 + m_Depth: -1 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 1 + m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 diff --git a/Assets/Samples/Input System/1.0.2/Simple Demo/SimpleDemo_UsingActions.unity.meta b/Assets/Samples/Input System/1.0.2/Simple Demo/SimpleDemo_UsingActions.unity.meta new file mode 100644 index 0000000..cfe31c0 --- /dev/null +++ b/Assets/Samples/Input System/1.0.2/Simple Demo/SimpleDemo_UsingActions.unity.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: f2caf1f86d6cf4e4093394b90ea1708e +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Samples/Input System/1.0.2/Simple Demo/SimpleDemo_UsingPlayerInput.unity b/Assets/Samples/Input System/1.0.2/Simple Demo/SimpleDemo_UsingPlayerInput.unity new file mode 100644 index 0000000..ae64c80 --- /dev/null +++ b/Assets/Samples/Input System/1.0.2/Simple Demo/SimpleDemo_UsingPlayerInput.unity @@ -0,0 +1,416 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +OcclusionCullingSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 + m_SceneGUID: 00000000000000000000000000000000 + m_OcclusionCullingData: {fileID: 0} +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 9 + m_Fog: 0 + m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + m_FogMode: 3 + m_FogDensity: 0.01 + m_LinearFogStart: 0 + m_LinearFogEnd: 300 + m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} + m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} + m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 0 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} + m_HaloStrength: 0.5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 1 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 0} + m_IndirectSpecularColor: {r: 0.44657856, g: 0.49641234, b: 0.57481724, a: 1} + m_UseRadianceAmbientProbe: 0 +--- !u!157 &3 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 11 + m_GIWorkflowMode: 0 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 1 + m_LightmapEditorSettings: + serializedVersion: 12 + m_Resolution: 2 + m_BakeResolution: 40 + m_AtlasSize: 1024 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_ExtractAmbientOcclusion: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 1 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 2 + m_BakeBackend: 0 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVRBounces: 2 + m_PVREnvironmentSampleCount: 500 + m_PVREnvironmentReferencePointCount: 2048 + m_PVRFilteringMode: 2 + m_PVRDenoiserTypeDirect: 0 + m_PVRDenoiserTypeIndirect: 0 + m_PVRDenoiserTypeAO: 0 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVREnvironmentMIS: 0 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ShowResolutionOverlay: 1 + m_ExportTrainingData: 0 + m_LightingDataAsset: {fileID: 0} + m_UseShadowmask: 1 +--- !u!196 &4 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.16666667 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} +--- !u!1001 &3649407600332409107 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 3649407600666749872, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_Name + value: Environment + objectReference: {fileID: 0} + - target: {fileID: 3649407600666749879, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3649407600666749879, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3649407600666749879, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3649407600666749879, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 3649407600666749879, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 3649407600666749879, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 3649407600666749879, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3649407600666749879, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_RootOrder + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3649407600666749879, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3649407600666749879, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3649407600666749879, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3649407600666749879, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 512 + objectReference: {fileID: 0} + - target: {fileID: 3649407600666749879, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_AnchoredPosition.y + value: 384 + objectReference: {fileID: 0} + - target: {fileID: 3649407600666749879, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_SizeDelta.x + value: 100 + objectReference: {fileID: 0} + - target: {fileID: 3649407600666749879, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_SizeDelta.y + value: 100 + objectReference: {fileID: 0} + - target: {fileID: 3649407600666749879, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_AnchorMin.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 3649407600666749879, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_AnchorMin.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 3649407600666749879, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_AnchorMax.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 3649407600666749879, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_AnchorMax.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 3649407600666749879, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_Pivot.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 3649407600666749879, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_Pivot.y + value: 0.5 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: b6b5f266028754740b00996b1ad8ce4e, type: 3} +--- !u!1 &7279796982563314049 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7283255547635044647} + - component: {fileID: 7298693803741327381} + - component: {fileID: 7279796982563314051} + - component: {fileID: 7279796982563314050} + m_Layer: 0 + m_Name: Player + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &7279796982563314050 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7279796982563314049} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 62899f850307741f2a39c98a8b639597, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Actions: {fileID: -944628639613478452, guid: 97210cd740af04df697b1fa71c9c9623, + type: 3} + m_NotificationBehavior: 2 + m_UIInputModule: {fileID: 0} + m_DeviceLostEvent: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.InputSystem.PlayerInput+DeviceLostEvent, Unity.InputSystem, + Version=0.9.2.0, Culture=neutral, PublicKeyToken=null + m_DeviceRegainedEvent: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.InputSystem.PlayerInput+DeviceRegainedEvent, Unity.InputSystem, + Version=0.9.2.0, Culture=neutral, PublicKeyToken=null + m_ActionEvents: + - m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 7279796982563314051} + m_MethodName: OnFire + m_Mode: 0 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.InputSystem.PlayerInput+ActionEvent, Unity.InputSystem, + Version=0.9.2.0, Culture=neutral, PublicKeyToken=null + m_ActionId: 1077f913-a9f9-41b1-acb3-b9ee0adbc744 + m_ActionName: gameplay/fire[/Mouse/leftButton,/XboxGamepadMacOS/buttonSouth] + - m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 7279796982563314051} + m_MethodName: OnMove + m_Mode: 0 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.InputSystem.PlayerInput+ActionEvent, Unity.InputSystem, + Version=0.9.2.0, Culture=neutral, PublicKeyToken=null + m_ActionId: 50fd2809-3aa3-4a90-988e-1facf6773553 + m_ActionName: gameplay/move[/XboxGamepadMacOS/leftStick,/Keyboard/w,/Keyboard/s,/Keyboard/a,/Keyboard/d] + - m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 7279796982563314051} + m_MethodName: OnLook + m_Mode: 0 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.InputSystem.PlayerInput+ActionEvent, Unity.InputSystem, + Version=0.9.2.0, Culture=neutral, PublicKeyToken=null + m_ActionId: c60e0974-d140-4597-a40e-9862193067e9 + m_ActionName: gameplay/look[/XboxGamepadMacOS/rightStick,/Mouse/delta] + m_AutoSwitchControlScheme: 0 + m_DefaultControlScheme: + m_DefaultActionMap: 265c38f5-dd18-4d34-b198-aec58e1627ff + m_SplitScreenIndex: -1 + m_Camera: {fileID: 0} +--- !u!114 &7279796982563314051 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7279796982563314049} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0923a5a14f884859a39872d225d9c72b, type: 3} + m_Name: + m_EditorClassIdentifier: + moveSpeed: 10 + rotateSpeed: 60 + burstSpeed: 10 + projectile: {fileID: 1050929111787496, guid: 4be9e6cdd2d5d499ca5c16cc83fdf790, type: 3} +--- !u!4 &7283255547635044647 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7279796982563314049} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 1, z: -10} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!20 &7298693803741327381 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7279796982563314049} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} + m_projectionMatrixMode: 1 + m_GateFitMode: 2 + m_FOVAxisMode: 0 + m_SensorSize: {x: 36, y: 24} + m_LensShift: {x: 0, y: 0} + m_FocalLength: 50 + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.3 + far clip plane: 1000 + field of view: 60 + orthographic: 0 + orthographic size: 5 + m_Depth: -1 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 1 + m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 diff --git a/Assets/Samples/Input System/1.0.2/Simple Demo/SimpleDemo_UsingPlayerInput.unity.meta b/Assets/Samples/Input System/1.0.2/Simple Demo/SimpleDemo_UsingPlayerInput.unity.meta new file mode 100644 index 0000000..44da46f --- /dev/null +++ b/Assets/Samples/Input System/1.0.2/Simple Demo/SimpleDemo_UsingPlayerInput.unity.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 244f1ab64a936478a88c45243ee5d285 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Samples/Input System/1.0.2/Simple Demo/SimpleDemo_UsingState.unity b/Assets/Samples/Input System/1.0.2/Simple Demo/SimpleDemo_UsingState.unity new file mode 100644 index 0000000..010b41c --- /dev/null +++ b/Assets/Samples/Input System/1.0.2/Simple Demo/SimpleDemo_UsingState.unity @@ -0,0 +1,331 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +OcclusionCullingSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 + m_SceneGUID: 00000000000000000000000000000000 + m_OcclusionCullingData: {fileID: 0} +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 9 + m_Fog: 0 + m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + m_FogMode: 3 + m_FogDensity: 0.01 + m_LinearFogStart: 0 + m_LinearFogEnd: 300 + m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} + m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} + m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 0 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} + m_HaloStrength: 0.5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 1 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 0} + m_IndirectSpecularColor: {r: 0.44657856, g: 0.49641234, b: 0.57481724, a: 1} + m_UseRadianceAmbientProbe: 0 +--- !u!157 &3 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 11 + m_GIWorkflowMode: 0 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 1 + m_LightmapEditorSettings: + serializedVersion: 12 + m_Resolution: 2 + m_BakeResolution: 40 + m_AtlasSize: 1024 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_ExtractAmbientOcclusion: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 1 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 2 + m_BakeBackend: 0 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVRBounces: 2 + m_PVREnvironmentSampleCount: 500 + m_PVREnvironmentReferencePointCount: 2048 + m_PVRFilteringMode: 2 + m_PVRDenoiserTypeDirect: 0 + m_PVRDenoiserTypeIndirect: 0 + m_PVRDenoiserTypeAO: 0 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVREnvironmentMIS: 0 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ShowResolutionOverlay: 1 + m_ExportTrainingData: 0 + m_LightingDataAsset: {fileID: 0} + m_UseShadowmask: 1 +--- !u!196 &4 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.16666667 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} +--- !u!1001 &3649407600332409107 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 3649407600666749872, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_Name + value: Environment + objectReference: {fileID: 0} + - target: {fileID: 3649407600666749879, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3649407600666749879, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3649407600666749879, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3649407600666749879, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 3649407600666749879, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 3649407600666749879, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 3649407600666749879, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3649407600666749879, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_RootOrder + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3649407600666749879, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3649407600666749879, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3649407600666749879, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3649407600666749879, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 512 + objectReference: {fileID: 0} + - target: {fileID: 3649407600666749879, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_AnchoredPosition.y + value: 384 + objectReference: {fileID: 0} + - target: {fileID: 3649407600666749879, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_SizeDelta.x + value: 100 + objectReference: {fileID: 0} + - target: {fileID: 3649407600666749879, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_SizeDelta.y + value: 100 + objectReference: {fileID: 0} + - target: {fileID: 3649407600666749879, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_AnchorMin.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 3649407600666749879, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_AnchorMin.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 3649407600666749879, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_AnchorMax.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 3649407600666749879, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_AnchorMax.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 3649407600666749879, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_Pivot.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 3649407600666749879, guid: b6b5f266028754740b00996b1ad8ce4e, + type: 3} + propertyPath: m_Pivot.y + value: 0.5 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: b6b5f266028754740b00996b1ad8ce4e, type: 3} +--- !u!1 &7279796982563314049 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7283255547635044647} + - component: {fileID: 7298693803741327381} + - component: {fileID: 7279796982563314051} + m_Layer: 0 + m_Name: Player + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &7279796982563314051 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7279796982563314049} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6530e5fa6e7bd4c9d99219c476807b5e, type: 3} + m_Name: + m_EditorClassIdentifier: + moveSpeed: 10 + rotateSpeed: 60 + projectile: {fileID: 1050929111787496, guid: 4be9e6cdd2d5d499ca5c16cc83fdf790, type: 3} +--- !u!4 &7283255547635044647 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7279796982563314049} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 1, z: -10} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!20 &7298693803741327381 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7279796982563314049} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} + m_projectionMatrixMode: 1 + m_GateFitMode: 2 + m_FOVAxisMode: 0 + m_SensorSize: {x: 36, y: 24} + m_LensShift: {x: 0, y: 0} + m_FocalLength: 50 + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.3 + far clip plane: 1000 + field of view: 60 + orthographic: 0 + orthographic size: 5 + m_Depth: -1 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 1 + m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 diff --git a/Assets/Samples/Input System/1.0.2/Simple Demo/SimpleDemo_UsingState.unity.meta b/Assets/Samples/Input System/1.0.2/Simple Demo/SimpleDemo_UsingState.unity.meta new file mode 100644 index 0000000..84a965a --- /dev/null +++ b/Assets/Samples/Input System/1.0.2/Simple Demo/SimpleDemo_UsingState.unity.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 3faa7bc12c6044a9c8e7796450744620 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Samples/Input System/1.0.2/Simple Demo/SimpleProjectile.prefab b/Assets/Samples/Input System/1.0.2/Simple Demo/SimpleProjectile.prefab new file mode 100644 index 0000000..383d116 --- /dev/null +++ b/Assets/Samples/Input System/1.0.2/Simple Demo/SimpleProjectile.prefab @@ -0,0 +1,114 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 0} + m_RootGameObject: {fileID: 1050929111787496} + m_IsPrefabAsset: 1 +--- !u!1 &1050929111787496 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 6 + m_Component: + - component: {fileID: 4939001955002736} + - component: {fileID: 33329194892259988} + - component: {fileID: 65754914235384544} + - component: {fileID: 23498649278503262} + - component: {fileID: 54430940299048930} + m_Layer: 0 + m_Name: SimpleProjectile + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4939001955002736 +Transform: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1050929111787496} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0.2921129, y: 0.2921129, z: 0.2921129} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &23498649278503262 +MeshRenderer: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1050929111787496} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 4294967295 + m_Materials: + - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!33 &33329194892259988 +MeshFilter: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1050929111787496} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!54 &54430940299048930 +Rigidbody: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1050929111787496} + serializedVersion: 2 + m_Mass: 1 + m_Drag: 0 + m_AngularDrag: 0.05 + m_UseGravity: 1 + m_IsKinematic: 0 + m_Interpolate: 0 + m_Constraints: 0 + m_CollisionDetection: 0 +--- !u!65 &65754914235384544 +BoxCollider: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1050929111787496} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} diff --git a/Assets/Samples/Input System/1.0.2/Simple Demo/SimpleProjectile.prefab.meta b/Assets/Samples/Input System/1.0.2/Simple Demo/SimpleProjectile.prefab.meta new file mode 100644 index 0000000..875b9dc --- /dev/null +++ b/Assets/Samples/Input System/1.0.2/Simple Demo/SimpleProjectile.prefab.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 4be9e6cdd2d5d499ca5c16cc83fdf790 +PrefabImporter: + externalObjects: {} + addedSourceAssetObjects: [] + isPrefabVariant: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/SampleScene.unity b/Assets/Scenes/SampleScene.unity index 0414a4c..060901f 100644 --- a/Assets/Scenes/SampleScene.unity +++ b/Assets/Scenes/SampleScene.unity @@ -123,6 +123,159 @@ NavMeshSettings: debug: m_Flags: 0 m_NavMeshData: {fileID: 0} +--- !u!1 &14436342 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 14436343} + - component: {fileID: 14436345} + - component: {fileID: 14436344} + m_Layer: 5 + m_Name: "\u6469\u5C14\u65AF\uFF1F" + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &14436343 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 14436342} + 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_Children: [] + m_Father: {fileID: 1658128064} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.38231927, y: 0.4296921} + m_AnchorMax: {x: 0.62600005, y: 0.5493461} + m_AnchoredPosition: {x: -0.6268387, y: 9.151211} + m_SizeDelta: {x: 63.499454, y: -12.451035} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &14436344 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 14436342} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 1 + m_MinSize: 14 + m_MaxSize: 150 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: 123 +--- !u!222 &14436345 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 14436342} + m_CullTransparentMesh: 1 +--- !u!1 &292784627 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 292784630} + - component: {fileID: 292784629} + - component: {fileID: 292784628} + m_Layer: 0 + m_Name: EventSystem + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &292784628 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 292784627} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 01614664b831546d2ae94a42149d80ac, type: 3} + m_Name: + m_EditorClassIdentifier: + m_MoveRepeatDelay: 0.5 + m_MoveRepeatRate: 0.1 + m_ActionsAsset: {fileID: -944628639613478452, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3} + m_PointAction: {fileID: 1054132383583890850, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3} + m_MoveAction: {fileID: 3710738434707379630, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3} + m_SubmitAction: {fileID: 2064916234097673511, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3} + m_CancelAction: {fileID: -1967631576421560919, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3} + m_LeftClickAction: {fileID: 8056856818456041789, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3} + m_MiddleClickAction: {fileID: 3279352641294131588, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3} + m_RightClickAction: {fileID: 3837173908680883260, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3} + m_ScrollWheelAction: {fileID: 4502412055082496612, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3} + m_TrackedDevicePositionAction: {fileID: 4754684134866288074, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3} + m_TrackedDeviceOrientationAction: {fileID: 1025543830046995696, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3} + m_DeselectOnBackgroundClick: 1 + m_PointerBehavior: 0 +--- !u!114 &292784629 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 292784627} + 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!4 &292784630 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 292784627} + 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_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 7 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &519420028 GameObject: m_ObjectHideFlags: 0 @@ -239,3 +392,772 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &683991493 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 683991495} + - component: {fileID: 683991494} + - component: {fileID: 683991496} + - component: {fileID: 683991497} + m_Layer: 0 + m_Name: Machine + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!212 &683991494 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 683991493} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 0 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_Sprite: {fileID: 7482667652216324306, guid: 48e93eef0688c4a259cb0eddcd8661f7, type: 3} + m_Color: {r: 0.24334282, g: 0.8773582, b: 0.8773585, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 1, y: 1} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_MaskInteraction: 0 + m_SpriteSortPoint: 0 +--- !u!4 &683991495 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 683991493} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 8.38, y: -1.91, z: 0} + m_LocalScale: {x: 1, y: 2.575, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!61 &683991496 +BoxCollider2D: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 683991493} + m_Enabled: 1 + m_Density: 1 + m_Material: {fileID: 0} + m_IsTrigger: 1 + m_UsedByEffector: 0 + m_UsedByComposite: 0 + m_Offset: {x: 0, y: 0} + m_SpriteTilingProperty: + border: {x: 0, y: 0, z: 0, w: 0} + pivot: {x: 0.5, y: 0.5} + oldSize: {x: 1, y: 1} + newSize: {x: 1, y: 1} + adaptiveTilingThreshold: 0.5 + drawMode: 0 + adaptiveTiling: 0 + m_AutoTiling: 0 + serializedVersion: 2 + m_Size: {x: 1, y: 1} + m_EdgeRadius: 0 +--- !u!114 &683991497 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 683991493} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0b3b8d8c9e2121a45a24a9f51d24a8ba, type: 3} + m_Name: + m_EditorClassIdentifier: + m_interface: {fileID: 1658128063} + codeTextView: {fileID: 14436344} +--- !u!1 &917915209 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 917915211} + - component: {fileID: 917915210} + m_Layer: 0 + m_Name: IndexRecoder + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &917915210 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 917915209} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e41ecfa04d814ee4bacfe98da6c8af21, type: 3} + m_Name: + m_EditorClassIdentifier: + playerMoveSpeed: 10 + playerJumpSpeed: 10 + bulletSpeed: 0 + runSpeedMultiple: 1.5 + dotRoLineTime: 0.5 +--- !u!4 &917915211 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 917915209} + 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_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1434512943 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1434512946} + - component: {fileID: 1434512945} + - component: {fileID: 1434512944} + - component: {fileID: 1434512947} + - component: {fileID: 1434512948} + - component: {fileID: 1434512949} + m_Layer: 0 + m_Name: Player + m_TagString: Player + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1434512944 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1434512943} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 62899f850307741f2a39c98a8b639597, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Actions: {fileID: -944628639613478452, guid: 6c1186e0febe48c4e866173c0f39422d, type: 3} + m_NotificationBehavior: 2 + m_UIInputModule: {fileID: 0} + m_DeviceLostEvent: + m_PersistentCalls: + m_Calls: [] + m_DeviceRegainedEvent: + m_PersistentCalls: + m_Calls: [] + m_ControlsChangedEvent: + m_PersistentCalls: + m_Calls: [] + m_ActionEvents: + - m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 1434512949} + m_TargetAssemblyTypeName: M_Player, Assembly-CSharp + m_MethodName: OnMoveHorizons + m_Mode: 0 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + m_ActionId: 5a93f020-27b4-4cb6-975f-af9ed1ef4ec3 + m_ActionName: PlayerNormal/MoveHorizons[/Keyboard/a,/Keyboard/d,/XInputControllerWindows/leftStick/left,/XInputControllerWindows/leftStick/right] + - m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 1434512949} + m_TargetAssemblyTypeName: M_Player, Assembly-CSharp + m_MethodName: OnRun + m_Mode: 0 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + m_ActionId: 5c554403-34b9-4a85-a8f5-ac58363cad75 + m_ActionName: PlayerNormal/Run[/XInputControllerWindows/rightShoulder,/Keyboard/shift] + - m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 1434512949} + m_TargetAssemblyTypeName: M_Player, Assembly-CSharp + m_MethodName: OnInteraction + m_Mode: 0 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + m_ActionId: a3099043-3ac2-4656-8595-f0c577842621 + m_ActionName: PlayerNormal/Interaction[/XInputControllerWindows/buttonWest,/Keyboard/f] + - m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 1434512949} + m_TargetAssemblyTypeName: M_Player, Assembly-CSharp + m_MethodName: OnCoding + m_Mode: 0 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + m_ActionId: f7af9390-5dad-4c80-a4a7-83d8314f8e88 + m_ActionName: PlayerNormal/Codeing[/XInputControllerWindows/rightTrigger,/Keyboard/space] + m_NeverAutoSwitchControlSchemes: 0 + m_DefaultControlScheme: + m_DefaultActionMap: PlayerNormal + m_SplitScreenIndex: -1 + m_Camera: {fileID: 0} +--- !u!212 &1434512945 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1434512943} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 0 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_Sprite: {fileID: 7482667652216324306, guid: 48e93eef0688c4a259cb0eddcd8661f7, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 1, y: 1} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_MaskInteraction: 0 + m_SpriteSortPoint: 0 +--- !u!4 &1434512946 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1434512943} + 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_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!61 &1434512947 +BoxCollider2D: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1434512943} + m_Enabled: 1 + m_Density: 1 + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_UsedByEffector: 0 + m_UsedByComposite: 0 + m_Offset: {x: 0, y: 0} + m_SpriteTilingProperty: + border: {x: 0, y: 0, z: 0, w: 0} + pivot: {x: 0.5, y: 0.5} + oldSize: {x: 1, y: 1} + newSize: {x: 1, y: 1} + adaptiveTilingThreshold: 0.5 + drawMode: 0 + adaptiveTiling: 0 + m_AutoTiling: 0 + serializedVersion: 2 + m_Size: {x: 1, y: 1} + m_EdgeRadius: 0 +--- !u!50 &1434512948 +Rigidbody2D: + serializedVersion: 4 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1434512943} + m_BodyType: 0 + m_Simulated: 1 + m_UseFullKinematicContacts: 0 + m_UseAutoMass: 0 + m_Mass: 1 + m_LinearDrag: 0 + m_AngularDrag: 0.05 + m_GravityScale: 1 + m_Material: {fileID: 0} + m_Interpolate: 0 + m_SleepingMode: 1 + m_CollisionDetection: 0 + m_Constraints: 0 +--- !u!114 &1434512949 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1434512943} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e2c1a0de69ef6d468a14db32ebf68fe, type: 3} + m_Name: + m_EditorClassIdentifier: + catched: {fileID: 0} +--- !u!1 &1658128063 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1658128064} + - component: {fileID: 1658128066} + - component: {fileID: 1658128065} + m_Layer: 5 + m_Name: MachinePanel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!224 &1658128064 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1658128063} + 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_Children: + - {fileID: 14436343} + m_Father: {fileID: 1837069814} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.155698, y: 0} + m_AnchorMax: {x: 0.852547, y: 0.9612789} + m_AnchoredPosition: {x: -1.5, y: 4} + m_SizeDelta: {x: -14.413208, y: -11.061707} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1658128065 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1658128063} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &1658128066 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1658128063} + m_CullTransparentMesh: 1 +--- !u!1 &1755345162 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1755345164} + - component: {fileID: 1755345163} + m_Layer: 0 + m_Name: Light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1755345163 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1755345162} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 073797afb82c5a1438f328866b10b3f0, type: 3} + m_Name: + m_EditorClassIdentifier: + m_LightType: 1 + m_BlendStyleIndex: 0 + m_FalloffIntensity: 0.396 + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_Intensity: 1 + m_LightVolumeOpacity: 0 + m_ApplyToSortingLayers: 00000000 + m_LightCookieSprite: {fileID: 0} + m_UseNormalMap: 0 + m_LightOrder: 0 + m_AlphaBlendOnOverlap: 0 + m_ShadowIntensity: 0 + m_ShadowVolumeIntensity: 0 + m_PointLightInnerAngle: 360 + m_PointLightOuterAngle: 360 + m_PointLightInnerRadius: 0 + m_PointLightOuterRadius: 1 + m_PointLightDistance: 3 + m_PointLightQuality: 1 + m_ShapeLightParametricSides: 5 + m_ShapeLightParametricAngleOffset: 0 + m_ShapeLightParametricRadius: 1 + m_ShapeLightFalloffSize: 0.5 + m_ShapeLightFalloffOffset: {x: 0, y: 0} + m_ShapePath: + - {x: -0.5, y: -0.5, z: 0} + - {x: 0.5, y: -0.5, z: 0} + - {x: 0.5, y: 0.5, z: 0} + - {x: -0.5, y: 0.5, z: 0} +--- !u!4 &1755345164 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1755345162} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 2.44, y: 1.9, z: 0} + m_LocalScale: {x: 80.14687, y: 9.6395, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1837069810 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1837069814} + - component: {fileID: 1837069813} + - component: {fileID: 1837069812} + - component: {fileID: 1837069811} + m_Layer: 5 + m_Name: Canvas + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1837069811 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1837069810} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreReversedGraphics: 1 + m_BlockingObjects: 0 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 4294967295 +--- !u!114 &1837069812 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1837069810} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UiScaleMode: 0 + m_ReferencePixelsPerUnit: 100 + m_ScaleFactor: 1 + m_ReferenceResolution: {x: 800, y: 600} + m_ScreenMatchMode: 0 + m_MatchWidthOrHeight: 0 + m_PhysicalUnit: 3 + m_FallbackScreenDPI: 96 + m_DefaultSpriteDPI: 96 + m_DynamicPixelsPerUnit: 1 + m_PresetInfoIsWorld: 0 +--- !u!223 &1837069813 +Canvas: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1837069810} + m_Enabled: 1 + serializedVersion: 3 + m_RenderMode: 0 + m_Camera: {fileID: 0} + m_PlaneDistance: 100 + m_PixelPerfect: 0 + m_ReceivesEvents: 1 + m_OverrideSorting: 0 + m_OverridePixelPerfect: 0 + m_SortingBucketNormalizedSize: 0 + m_AdditionalShaderChannelsFlag: 0 + m_SortingLayerID: 0 + m_SortingOrder: 0 + m_TargetDisplay: 0 +--- !u!224 &1837069814 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1837069810} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0, y: 0, z: 0} + m_Children: + - {fileID: 1658128064} + m_Father: {fileID: 0} + m_RootOrder: 6 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0, y: 0} +--- !u!1 &2018000182 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2018000184} + - component: {fileID: 2018000183} + - component: {fileID: 2018000185} + m_Layer: 0 + m_Name: Ground + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!212 &2018000183 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2018000182} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 0 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_Sprite: {fileID: 7482667652216324306, guid: 48e93eef0688c4a259cb0eddcd8661f7, type: 3} + m_Color: {r: 0.8773585, g: 0.29300457, b: 0.29300457, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 1, y: 1} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_MaskInteraction: 0 + m_SpriteSortPoint: 0 +--- !u!4 &2018000184 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2018000182} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: -4.83, z: 0} + m_LocalScale: {x: 37.209187, y: 3.9575, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!61 &2018000185 +BoxCollider2D: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2018000182} + m_Enabled: 1 + m_Density: 1 + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_UsedByEffector: 0 + m_UsedByComposite: 0 + m_Offset: {x: 0, y: 0} + m_SpriteTilingProperty: + border: {x: 0, y: 0, z: 0, w: 0} + pivot: {x: 0.5, y: 0.5} + oldSize: {x: 1, y: 1} + newSize: {x: 1, y: 1} + adaptiveTilingThreshold: 0.5 + drawMode: 0 + adaptiveTiling: 0 + m_AutoTiling: 0 + serializedVersion: 2 + m_Size: {x: 1, y: 1} + m_EdgeRadius: 0 diff --git a/Assets/Scripts.meta b/Assets/Scripts.meta new file mode 100644 index 0000000..ddb5e6e --- /dev/null +++ b/Assets/Scripts.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: db5303f9fa237b44eb7d832a32ba640c +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/IndexRecoder.cs b/Assets/Scripts/IndexRecoder.cs new file mode 100644 index 0000000..0e92701 --- /dev/null +++ b/Assets/Scripts/IndexRecoder.cs @@ -0,0 +1,24 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class IndexRecoder : MonoBehaviour +{ + // Start is called before the first frame update + public float playerMoveSpeed;//角色普通移动速度 + public float playerJumpSpeed;//角色跳跃力度 + public float bulletSpeed;//子弹速度 + public float runSpeedMultiple;//角色跑步的时候,速度是普通状态的多少倍 + + public float dotRoLineTime;//判定输入为点还是横线的界限时间 + void Start() + { + + } + + // Update is called once per frame + void Update() + { + + } +} diff --git a/Assets/Scripts/IndexRecoder.cs.meta b/Assets/Scripts/IndexRecoder.cs.meta new file mode 100644 index 0000000..51b2c39 --- /dev/null +++ b/Assets/Scripts/IndexRecoder.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e41ecfa04d814ee4bacfe98da6c8af21 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Interactive.cs b/Assets/Scripts/Interactive.cs new file mode 100644 index 0000000..bc800ef --- /dev/null +++ b/Assets/Scripts/Interactive.cs @@ -0,0 +1,44 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.UI; + +public class Interactive : MonoBehaviour +{ + // Start is called before the first frame update + public GameObject m_interface; + + void Start() + { + + } + + // Update is called once per frame + void Update() + { + + } + + void OnTriggerEnter2D(Collider2D other) + { + if(other.tag == "Player") + { + other.GetComponent().catched = this; + } + } + + void OnTriggerExit2D(Collider2D other) + { + if(other.tag == "Player") + { + other.GetComponent().catched = null; + } + } + + public void ShowInfo() + { + m_interface.SetActive(true); + } + + public virtual void Coding(string temp){} +} diff --git a/Assets/Scripts/Interactive.cs.meta b/Assets/Scripts/Interactive.cs.meta new file mode 100644 index 0000000..55936ef --- /dev/null +++ b/Assets/Scripts/Interactive.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 624ce03e95caec54cb598773581d9b4d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/M_Player.cs b/Assets/Scripts/M_Player.cs new file mode 100644 index 0000000..155363a --- /dev/null +++ b/Assets/Scripts/M_Player.cs @@ -0,0 +1,131 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.InputSystem; +using UnityEngine.InputSystem.Interactions; +using UnityEngine.UI; + +public class M_Player : MonoBehaviour +{ + // Start is called before the first frame update + private IndexRecoder indexRecoder;//记录组件,内存方便修改的参数 + private Vector2 velocity;//逻辑速度,通过计算获得,最后加在理论速度上 + private Rigidbody2D m_rigidbody;//自身刚体组件 + private int inputDir;//输入方向方向,-1\0\1 + //public GameObject bullet;//子弹预制体 + private int faceDir;//面部朝向,-1、1 + private float runSpeedMultiple = 1f;//速度倍率,在按下和释放跑步后被修改 + + public Interactive catched;//所捕捉到的可交互对象 + void Start() + { + //获取数值记录组件,方便策划修改暴露参数 + indexRecoder = FindObjectOfType(); + //获取自身刚体组件 + m_rigidbody = GetComponent(); + //默认面部朝右 + faceDir = 1; + } + + // Update is called once per frame + void Update() + { + + } + + void FixedUpdate() + { + Move(); + } + + //当水平轴有输入 + public void OnMoveHorizons(InputAction.CallbackContext context) + { + float value = context.ReadValue(); + //输入只有对移动方向和面部朝向的更改 + if(value > 0) + { + inputDir = 1; + faceDir = 1; + } + + else if(value < 0) + { + inputDir = -1; + faceDir = -1; + } + else inputDir = 0; + //修改面部朝向 + transform.localScale = new Vector3( + Mathf.Abs(transform.localScale.x)*faceDir, + transform.localScale.y, + transform.localScale.z); + } + + public void OnFire() + { + // GameObject temp = Instantiate(bullet,m_rigidbody.position,Quaternion.identity); + // temp.GetComponent().SetDir(faceDir); + } + + private void Move() + { + //指定水平方向的速度 + m_rigidbody.velocity = new Vector2(indexRecoder.playerMoveSpeed* //记录文件中的玩家速度乘以 + inputDir*//输入的方向乘以 + runSpeedMultiple,//速度的倍率,对付跑步时候的需要 + m_rigidbody.velocity.y//y轴的速度不变 + ); + + } + + private void OnJump() + { + //跳的时候给一个垂直向上的速度 + m_rigidbody.velocity = new Vector2(0,indexRecoder.playerJumpSpeed); + } + + public void OnRun(InputAction.CallbackContext context) + { + if(context.started)//如果刚按下跑步键 + { + runSpeedMultiple = indexRecoder.runSpeedMultiple;//把本地的速度倍率变成数值记录器中的倍率 + } + else if(context.canceled)//如果刚松开跑步键 + { + runSpeedMultiple = 1f;//恢复本地速度倍率为1 + } + } + + public void OnInteraction(InputAction.CallbackContext context) + { + if(context.started) + { + if(catched != null) + { + catched.ShowInfo(); + } + } + } + + public void OnCoding(InputAction.CallbackContext context) + { + if(context.canceled) + { + if(catched != null) + { + if(context.duration < indexRecoder.dotRoLineTime)//如果小于界限时间 + { + catched.Coding("."); + } + else + { + catched.Coding("-"); + } + } + + } + } + + +} diff --git a/Assets/Scripts/M_Player.cs.meta b/Assets/Scripts/M_Player.cs.meta new file mode 100644 index 0000000..91fad76 --- /dev/null +++ b/Assets/Scripts/M_Player.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 4e2c1a0de69ef6d468a14db32ebf68fe +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Player.cs b/Assets/Scripts/Machine.cs similarity index 50% rename from Assets/Player.cs rename to Assets/Scripts/Machine.cs index e5cd26e..fac4ed3 100644 --- a/Assets/Player.cs +++ b/Assets/Scripts/Machine.cs @@ -1,14 +1,17 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; +using UnityEngine.UI; -public class Player : MonoBehaviour +public class Machine : Interactive { // Start is called before the first frame update + + + public Text codeTextView; void Start() { - Debug.Log("hello"); - Debug.Log("hello2"); + //m_interface = GameObject.Find("MachinePanel"); } // Update is called once per frame @@ -16,4 +19,12 @@ public class Player : MonoBehaviour { } + + + public override void Coding(string temp) + { + codeTextView.text += temp; + } + + } diff --git a/Assets/Scripts/Machine.cs.meta b/Assets/Scripts/Machine.cs.meta new file mode 100644 index 0000000..87372e9 --- /dev/null +++ b/Assets/Scripts/Machine.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 0b3b8d8c9e2121a45a24a9f51d24a8ba +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Logs/ApiUpdaterCheck.txt b/Logs/ApiUpdaterCheck.txt new file mode 100644 index 0000000..060f869 --- /dev/null +++ b/Logs/ApiUpdaterCheck.txt @@ -0,0 +1,80 @@ +[api-updater (non-obsolete-error-filter)] 2021/7/1 19:35:01 : Starting D:/unity3.7/Unity/Editor/Data/Tools/ScriptUpdater/APIUpdater.NonObsoleteApiUpdaterDetector.exe +[api-updater (non-obsolete-error-filter)] +---------------------------------- +jit/startup time : 468.8577ms +moved types parse time: 49ms +candidates parse time : 1ms +C# parse time : 483ms +candidates check time : 29ms +console write time : 0ms + +[api-updater (non-obsolete-error-filter)] 2021/7/1 19:35:10 : Starting D:/unity3.7/Unity/Editor/Data/Tools/ScriptUpdater/APIUpdater.NonObsoleteApiUpdaterDetector.exe +[api-updater (non-obsolete-error-filter)] +---------------------------------- +jit/startup time : 73.8049ms +moved types parse time: 49ms +candidates parse time : 1ms +C# parse time : 212ms +candidates check time : 49ms +console write time : 0ms + +[api-updater (non-obsolete-error-filter)] 2021/7/1 19:35:34 : Starting D:/unity3.7/Unity/Editor/Data/Tools/ScriptUpdater/APIUpdater.NonObsoleteApiUpdaterDetector.exe +[api-updater (non-obsolete-error-filter)] +---------------------------------- +jit/startup time : 69.7804ms +moved types parse time: 53ms +candidates parse time : 1ms +C# parse time : 174ms +candidates check time : 27ms +console write time : 0ms + +[api-updater (non-obsolete-error-filter)] 2021/7/1 19:35:42 : Starting D:/unity3.7/Unity/Editor/Data/Tools/ScriptUpdater/APIUpdater.NonObsoleteApiUpdaterDetector.exe +[api-updater (non-obsolete-error-filter)] +---------------------------------- +jit/startup time : 72.83ms +moved types parse time: 59ms +candidates parse time : 1ms +C# parse time : 182ms +candidates check time : 29ms +console write time : 0ms + +[api-updater (non-obsolete-error-filter)] 2021/7/1 19:35:50 : Starting D:/unity3.7/Unity/Editor/Data/Tools/ScriptUpdater/APIUpdater.NonObsoleteApiUpdaterDetector.exe +[api-updater (non-obsolete-error-filter)] +---------------------------------- +jit/startup time : 72.8289ms +moved types parse time: 47ms +candidates parse time : 1ms +C# parse time : 172ms +candidates check time : 30ms +console write time : 0ms + +[api-updater (non-obsolete-error-filter)] 2021/7/1 19:36:07 : Starting D:/unity3.7/Unity/Editor/Data/Tools/ScriptUpdater/APIUpdater.NonObsoleteApiUpdaterDetector.exe +[api-updater (non-obsolete-error-filter)] +---------------------------------- +jit/startup time : 69.8144ms +moved types parse time: 47ms +candidates parse time : 1ms +C# parse time : 174ms +candidates check time : 29ms +console write time : 0ms + +[api-updater (non-obsolete-error-filter)] 2021/7/1 19:36:18 : Starting D:/unity3.7/Unity/Editor/Data/Tools/ScriptUpdater/APIUpdater.NonObsoleteApiUpdaterDetector.exe +[api-updater (non-obsolete-error-filter)] +---------------------------------- +jit/startup time : 67.3915ms +moved types parse time: 47ms +candidates parse time : 1ms +C# parse time : 169ms +candidates check time : 28ms +console write time : 0ms + +[api-updater (non-obsolete-error-filter)] 2021/7/1 19:38:32 : Starting D:/unity3.7/Unity/Editor/Data/Tools/ScriptUpdater/APIUpdater.NonObsoleteApiUpdaterDetector.exe +[api-updater (non-obsolete-error-filter)] +---------------------------------- +jit/startup time : 77.7917ms +moved types parse time: 48ms +candidates parse time : 1ms +C# parse time : 169ms +candidates check time : 27ms +console write time : 0ms + diff --git a/ProjectSettings/EditorBuildSettings.asset b/ProjectSettings/EditorBuildSettings.asset index 82ab0f5..73c8a33 100644 --- a/ProjectSettings/EditorBuildSettings.asset +++ b/ProjectSettings/EditorBuildSettings.asset @@ -8,4 +8,5 @@ EditorBuildSettings: - enabled: 1 path: Assets/Scenes/SampleScene.unity guid: 2cda990e2423bbf4892e6590ba056729 - m_configObjects: {} + m_configObjects: + com.unity.input.settings: {fileID: 11400000, guid: 5b0ac5f58f6660143aa0c32c9a8b5cd6, type: 2} diff --git a/UserSettings/EditorUserSettings.asset b/UserSettings/EditorUserSettings.asset index b543455..b5a222b 100644 --- a/UserSettings/EditorUserSettings.asset +++ b/UserSettings/EditorUserSettings.asset @@ -6,6 +6,18 @@ EditorUserSettings: serializedVersion: 4 m_ConfigSettings: RecentlyUsedScenePath-0: + value: 22424703114646680c031c2e1530103918070d3e6c1b3f23392c107cb3ae6476b0a805e0ea2a33397926ea310b713236ff1a050ed20e07042e3bee071ff8311005cc17cb3bdb0c19df5709c0c409c8 + flags: 0 + RecentlyUsedScenePath-1: + value: 22424703114646680c031c2e1530103918070d3e6c1b3f23392c107cb3ae6476b0a805e0ea2a33397926ea310b713236ff1a050ed20e07042e3bee071ff8311005cc17cb09860a12c20d05 + flags: 0 + RecentlyUsedScenePath-2: + value: 22424703114646680c031c2e1530103918070d3e6c1b3f23392c107cb3ae6476b0a805e0ea2a33397926ea310b713236ff1a050ed20e07042e3bee071ff8230710d11d8b0fc61608d2 + flags: 0 + RecentlyUsedScenePath-3: + value: 22424703114646680c031c2e1530103918070d3e6c1b3f23392c107cb3ae6476b0a805e0ea2a33397926ea310b713236ff1a050ed20e07042e3bee071ff8201f10dc1dd733c60f09df5709c0c409c8 + flags: 0 + RecentlyUsedScenePath-4: value: 22424703114646680e0b0227036c6c111b07142f1f2b233e2867083debf42d flags: 0 vcSharedLogLevel: