@@ -36,13 +36,21 @@ public @PlayerInputActions()
36
36
""interactions"": """"
37
37
},
38
38
{
39
- ""name"": ""Look "",
39
+ ""name"": ""LookMouse "",
40
40
""type"": ""Value"",
41
41
""id"": ""15fcc27f-7476-491b-bf84-3fbc33a9605b"",
42
42
""expectedControlType"": ""Vector2"",
43
43
""processors"": """",
44
44
""interactions"": """"
45
45
},
46
+ {
47
+ ""name"": ""LookGamepad"",
48
+ ""type"": ""Value"",
49
+ ""id"": ""1e3f5914-be6f-478c-bca9-2a8c4d3749eb"",
50
+ ""expectedControlType"": ""Vector2"",
51
+ ""processors"": """",
52
+ ""interactions"": """"
53
+ },
46
54
{
47
55
""name"": ""Fire"",
48
56
""type"": ""Button"",
@@ -166,44 +174,44 @@ public @PlayerInputActions()
166
174
{
167
175
""name"": """",
168
176
""id"": ""8c8e490b-c610-4785-884f-f04217b23ca4"",
169
- ""path"": ""<Pointer>/delta "",
177
+ ""path"": ""<Pointer>/position "",
170
178
""interactions"": """",
171
179
""processors"": """",
172
180
""groups"": "";Keyboard&Mouse;Touch"",
173
- ""action"": ""Look "",
181
+ ""action"": ""LookMouse "",
174
182
""isComposite"": false,
175
183
""isPartOfComposite"": false
176
184
},
177
185
{
178
186
""name"": """",
179
- ""id"": ""c1f7a91b-d0fd-4a62-997e-7fb9b69bf235 "",
180
- ""path"": ""<Gamepad>/rightStick "",
187
+ ""id"": ""05f6913d-c316-48b2-a6bb-e225f14c7960 "",
188
+ ""path"": ""<Mouse>/leftButton "",
181
189
""interactions"": """",
182
190
""processors"": """",
183
- ""groups"": "";Gamepad "",
184
- ""action"": ""Look "",
191
+ ""groups"": "";Keyboard&Mouse "",
192
+ ""action"": ""Fire "",
185
193
""isComposite"": false,
186
194
""isPartOfComposite"": false
187
195
},
188
196
{
189
197
""name"": """",
190
- ""id"": ""05f6913d-c316-48b2-a6bb-e225f14c7960 "",
191
- ""path"": ""<Mouse>/leftButton "",
198
+ ""id"": ""143bb1cd-cc10-4eca-a2f0-a3664166fe91 "",
199
+ ""path"": ""<Gamepad>/rightTrigger "",
192
200
""interactions"": """",
193
201
""processors"": """",
194
- ""groups"": "";Keyboard&Mouse "",
202
+ ""groups"": "";Gamepad "",
195
203
""action"": ""Fire"",
196
204
""isComposite"": false,
197
205
""isPartOfComposite"": false
198
206
},
199
207
{
200
208
""name"": """",
201
- ""id"": ""143bb1cd-cc10-4eca-a2f0-a3664166fe91 "",
202
- ""path"": ""<Gamepad>/rightTrigger "",
209
+ ""id"": ""559ec0f7-639c-49ba-a5fa-bb65f090a186 "",
210
+ ""path"": ""<Gamepad>/rightStick "",
203
211
""interactions"": """",
204
212
""processors"": """",
205
213
""groups"": "";Gamepad"",
206
- ""action"": ""Fire "",
214
+ ""action"": ""LookGamepad "",
207
215
""isComposite"": false,
208
216
""isPartOfComposite"": false
209
217
}
@@ -806,7 +814,8 @@ public @PlayerInputActions()
806
814
// Player
807
815
m_Player = asset . FindActionMap ( "Player" , throwIfNotFound : true ) ;
808
816
m_Player_Move = m_Player . FindAction ( "Move" , throwIfNotFound : true ) ;
809
- m_Player_Look = m_Player . FindAction ( "Look" , throwIfNotFound : true ) ;
817
+ m_Player_LookMouse = m_Player . FindAction ( "LookMouse" , throwIfNotFound : true ) ;
818
+ m_Player_LookGamepad = m_Player . FindAction ( "LookGamepad" , throwIfNotFound : true ) ;
810
819
m_Player_Fire = m_Player . FindAction ( "Fire" , throwIfNotFound : true ) ;
811
820
// UI
812
821
m_UI = asset . FindActionMap ( "UI" , throwIfNotFound : true ) ;
@@ -884,14 +893,16 @@ public int FindBinding(InputBinding bindingMask, out InputAction action)
884
893
private readonly InputActionMap m_Player ;
885
894
private IPlayerActions m_PlayerActionsCallbackInterface ;
886
895
private readonly InputAction m_Player_Move ;
887
- private readonly InputAction m_Player_Look ;
896
+ private readonly InputAction m_Player_LookMouse ;
897
+ private readonly InputAction m_Player_LookGamepad ;
888
898
private readonly InputAction m_Player_Fire ;
889
899
public struct PlayerActions
890
900
{
891
901
private @PlayerInputActions m_Wrapper ;
892
902
public PlayerActions ( @PlayerInputActions wrapper ) { m_Wrapper = wrapper ; }
893
903
public InputAction @Move => m_Wrapper . m_Player_Move ;
894
- public InputAction @Look => m_Wrapper . m_Player_Look ;
904
+ public InputAction @LookMouse => m_Wrapper . m_Player_LookMouse ;
905
+ public InputAction @LookGamepad => m_Wrapper . m_Player_LookGamepad ;
895
906
public InputAction @Fire => m_Wrapper . m_Player_Fire ;
896
907
public InputActionMap Get ( ) { return m_Wrapper . m_Player ; }
897
908
public void Enable ( ) { Get ( ) . Enable ( ) ; }
@@ -905,9 +916,12 @@ public void SetCallbacks(IPlayerActions instance)
905
916
@Move . started -= m_Wrapper . m_PlayerActionsCallbackInterface . OnMove ;
906
917
@Move . performed -= m_Wrapper . m_PlayerActionsCallbackInterface . OnMove ;
907
918
@Move . canceled -= m_Wrapper . m_PlayerActionsCallbackInterface . OnMove ;
908
- @Look . started -= m_Wrapper . m_PlayerActionsCallbackInterface . OnLook ;
909
- @Look . performed -= m_Wrapper . m_PlayerActionsCallbackInterface . OnLook ;
910
- @Look . canceled -= m_Wrapper . m_PlayerActionsCallbackInterface . OnLook ;
919
+ @LookMouse . started -= m_Wrapper . m_PlayerActionsCallbackInterface . OnLookMouse ;
920
+ @LookMouse . performed -= m_Wrapper . m_PlayerActionsCallbackInterface . OnLookMouse ;
921
+ @LookMouse . canceled -= m_Wrapper . m_PlayerActionsCallbackInterface . OnLookMouse ;
922
+ @LookGamepad . started -= m_Wrapper . m_PlayerActionsCallbackInterface . OnLookGamepad ;
923
+ @LookGamepad . performed -= m_Wrapper . m_PlayerActionsCallbackInterface . OnLookGamepad ;
924
+ @LookGamepad . canceled -= m_Wrapper . m_PlayerActionsCallbackInterface . OnLookGamepad ;
911
925
@Fire . started -= m_Wrapper . m_PlayerActionsCallbackInterface . OnFire ;
912
926
@Fire . performed -= m_Wrapper . m_PlayerActionsCallbackInterface . OnFire ;
913
927
@Fire . canceled -= m_Wrapper . m_PlayerActionsCallbackInterface . OnFire ;
@@ -918,9 +932,12 @@ public void SetCallbacks(IPlayerActions instance)
918
932
@Move . started += instance . OnMove ;
919
933
@Move . performed += instance . OnMove ;
920
934
@Move . canceled += instance . OnMove ;
921
- @Look . started += instance . OnLook ;
922
- @Look . performed += instance . OnLook ;
923
- @Look . canceled += instance . OnLook ;
935
+ @LookMouse . started += instance . OnLookMouse ;
936
+ @LookMouse . performed += instance . OnLookMouse ;
937
+ @LookMouse . canceled += instance . OnLookMouse ;
938
+ @LookGamepad . started += instance . OnLookGamepad ;
939
+ @LookGamepad . performed += instance . OnLookGamepad ;
940
+ @LookGamepad . canceled += instance . OnLookGamepad ;
924
941
@Fire . started += instance . OnFire ;
925
942
@Fire . performed += instance . OnFire ;
926
943
@Fire . canceled += instance . OnFire ;
@@ -1104,7 +1121,8 @@ public InputControlScheme TouchScheme
1104
1121
public interface IPlayerActions
1105
1122
{
1106
1123
void OnMove ( InputAction . CallbackContext context ) ;
1107
- void OnLook ( InputAction . CallbackContext context ) ;
1124
+ void OnLookMouse ( InputAction . CallbackContext context ) ;
1125
+ void OnLookGamepad ( InputAction . CallbackContext context ) ;
1108
1126
void OnFire ( InputAction . CallbackContext context ) ;
1109
1127
}
1110
1128
public interface IUIActions
0 commit comments