Skip to content

Commit 0d1fe6a

Browse files
authored
FIX: Several minor fixes (#807)
1 parent 345535f commit 0d1fe6a

File tree

5 files changed

+30
-22
lines changed

5 files changed

+30
-22
lines changed

Assets/TanksDemo/Assets/Scenes/ButtonRemapScreen.unity

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1427,24 +1427,30 @@ MonoBehaviour:
14271427
m_EditorClassIdentifier:
14281428
m_RepeatDelay: 0.5
14291429
m_RepeatRate: 0.1
1430-
m_ActionsAsset: {fileID: -944628639613478452, guid: 2960912a48c2ae741891e0507263b631,
1430+
m_ActionsAsset: {fileID: -944628639613478452, guid: ca9f5fa95ffab41fb9a615ab714db018,
14311431
type: 3}
1432-
m_PointAction: {fileID: 1054132383583890850, guid: 2960912a48c2ae741891e0507263b631,
1432+
m_PointAction: {fileID: 1054132383583890850, guid: ca9f5fa95ffab41fb9a615ab714db018,
14331433
type: 3}
1434-
m_MoveAction: {fileID: 3710738434707379630, guid: 2960912a48c2ae741891e0507263b631,
1434+
m_MoveAction: {fileID: 3710738434707379630, guid: ca9f5fa95ffab41fb9a615ab714db018,
14351435
type: 3}
1436-
m_SubmitAction: {fileID: 2064916234097673511, guid: 2960912a48c2ae741891e0507263b631,
1436+
m_SubmitAction: {fileID: 2064916234097673511, guid: ca9f5fa95ffab41fb9a615ab714db018,
14371437
type: 3}
1438-
m_CancelAction: {fileID: -1967631576421560919, guid: 2960912a48c2ae741891e0507263b631,
1438+
m_CancelAction: {fileID: -1967631576421560919, guid: ca9f5fa95ffab41fb9a615ab714db018,
14391439
type: 3}
1440-
m_LeftClickAction: {fileID: 8056856818456041789, guid: 2960912a48c2ae741891e0507263b631,
1440+
m_LeftClickAction: {fileID: 8056856818456041789, guid: ca9f5fa95ffab41fb9a615ab714db018,
1441+
type: 3}
1442+
m_MiddleClickAction: {fileID: 3279352641294131588, guid: ca9f5fa95ffab41fb9a615ab714db018,
1443+
type: 3}
1444+
m_RightClickAction: {fileID: 3837173908680883260, guid: ca9f5fa95ffab41fb9a615ab714db018,
1445+
type: 3}
1446+
m_ScrollWheelAction: {fileID: 4502412055082496612, guid: ca9f5fa95ffab41fb9a615ab714db018,
1447+
type: 3}
1448+
m_TrackedDevicePositionAction: {fileID: 4754684134866288074, guid: ca9f5fa95ffab41fb9a615ab714db018,
1449+
type: 3}
1450+
m_TrackedDeviceOrientationAction: {fileID: 1025543830046995696, guid: ca9f5fa95ffab41fb9a615ab714db018,
1451+
type: 3}
1452+
m_TrackedDeviceSelectAction: {fileID: 2559092417903258184, guid: ca9f5fa95ffab41fb9a615ab714db018,
14411453
type: 3}
1442-
m_MiddleClickAction: {fileID: 0}
1443-
m_RightClickAction: {fileID: 0}
1444-
m_ScrollWheelAction: {fileID: 0}
1445-
m_TrackedDevicePositionAction: {fileID: 0}
1446-
m_TrackedDeviceOrientationAction: {fileID: 0}
1447-
m_TrackedDeviceSelectAction: {fileID: 0}
14481454
--- !u!114 &1272049767
14491455
MonoBehaviour:
14501456
m_ObjectHideFlags: 0

Assets/TanksDemo/Assets/Scripts/UI/ControlRebindingUI.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ void RemapButtonClicked(string name, int bindingIndex = 0)
8989
{
9090
m_Button.enabled = false;
9191
m_Text.text = "Press button/stick for " + name;
92+
m_RebindOperation?.Dispose();
9293
m_RebindOperation = m_Action.PerformInteractiveRebinding()
9394
.WithControlsExcluding("<Mouse>/position")
9495
.WithControlsExcluding("<Mouse>/delta")

Assets/TanksDemo/Assets/TanksInputActions.inputactions

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
"path": "<Gamepad>/leftTrigger",
5454
"interactions": "",
5555
"processors": "",
56-
"groups": "",
56+
"groups": "Keyboard&Mouse;Gamepad",
5757
"action": "Brake",
5858
"isComposite": false,
5959
"isPartOfComposite": false
@@ -64,7 +64,7 @@
6464
"path": "<Gamepad>/leftStick/x",
6565
"interactions": "",
6666
"processors": "",
67-
"groups": "",
67+
"groups": "Keyboard&Mouse;Gamepad",
6868
"action": "Turret",
6969
"isComposite": false,
7070
"isPartOfComposite": false
@@ -86,7 +86,7 @@
8686
"path": "",
8787
"interactions": "",
8888
"processors": "",
89-
"groups": "",
89+
"groups": "Keyboard&Mouse;Gamepad",
9090
"action": "Turret",
9191
"isComposite": false,
9292
"isPartOfComposite": true
@@ -97,7 +97,7 @@
9797
"path": "",
9898
"interactions": "",
9999
"processors": "",
100-
"groups": "",
100+
"groups": "Keyboard&Mouse;Gamepad",
101101
"action": "Turret",
102102
"isComposite": false,
103103
"isPartOfComposite": true
@@ -108,7 +108,7 @@
108108
"path": "<Gamepad>/buttonSouth",
109109
"interactions": "",
110110
"processors": "",
111-
"groups": "",
111+
"groups": "Keyboard&Mouse;Gamepad",
112112
"action": "Fire",
113113
"isComposite": false,
114114
"isPartOfComposite": false
@@ -119,7 +119,7 @@
119119
"path": "<Gamepad>/start",
120120
"interactions": "",
121121
"processors": "",
122-
"groups": "",
122+
"groups": "Keyboard&Mouse;Gamepad",
123123
"action": "Pause",
124124
"isComposite": false,
125125
"isPartOfComposite": false
@@ -130,7 +130,7 @@
130130
"path": "<Gamepad>/rightTrigger",
131131
"interactions": "",
132132
"processors": "",
133-
"groups": "",
133+
"groups": "Keyboard&Mouse;Gamepad",
134134
"action": "Gas",
135135
"isComposite": false,
136136
"isPartOfComposite": false
@@ -244,7 +244,6 @@
244244
"controlSchemes": [
245245
{
246246
"name": "Keyboard&Mouse",
247-
"basedOn": "",
248247
"bindingGroup": "Keyboard&Mouse",
249248
"devices": [
250249
{
@@ -261,7 +260,6 @@
261260
},
262261
{
263262
"name": "Gamepad",
264-
"basedOn": "",
265263
"bindingGroup": "Gamepad",
266264
"devices": [
267265
{

Packages/com.unity.inputsystem/InputSystem/Editor/AssetEditor/NameAndParameterListView.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,9 @@ public void OnGUI()
162162
}
163163
if (GUILayout.Button(m_DeleteButton, EditorStyles.label))
164164
{
165+
// Unfocus controls, because otherwise, the editor can get confused and have text from a text field
166+
// on the deleted item leak to a different field.
167+
GUI.FocusControl(null);
165168
ArrayHelpers.EraseAt(ref m_ParametersForEachListItem, i);
166169
ArrayHelpers.EraseAt(ref m_EditableParametersForEachListItem, i);
167170
m_Apply();

Packages/com.unity.inputsystem/InputSystem/InputSystem.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2276,7 +2276,7 @@ internal static void InitializeInEditor(IInputRuntime runtime = null)
22762276
{
22772277
const string dialogText = "This project is using the new input system package but the native platform backends for the new input system are not enabled in the player settings. " +
22782278
"This means that no input from native devices will come through." +
2279-
"\n\nDo you want to enable the backends. Doing so requires a restart of the editor.";
2279+
"\n\nDo you want to enable the backends? Doing so requires a restart of the editor.";
22802280

22812281
if (EditorUtility.DisplayDialog("Warning", dialogText, "Yes", "No"))
22822282
EditorPlayerSettingHelpers.newSystemBackendsEnabled = true;

0 commit comments

Comments
 (0)