Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 18 additions & 12 deletions Assets/TanksDemo/Assets/Scenes/ButtonRemapScreen.unity
Original file line number Diff line number Diff line change
Expand Up @@ -1427,24 +1427,30 @@ MonoBehaviour:
m_EditorClassIdentifier:
m_RepeatDelay: 0.5
m_RepeatRate: 0.1
m_ActionsAsset: {fileID: -944628639613478452, guid: 2960912a48c2ae741891e0507263b631,
m_ActionsAsset: {fileID: -944628639613478452, guid: ca9f5fa95ffab41fb9a615ab714db018,
type: 3}
m_PointAction: {fileID: 1054132383583890850, guid: 2960912a48c2ae741891e0507263b631,
m_PointAction: {fileID: 1054132383583890850, guid: ca9f5fa95ffab41fb9a615ab714db018,
type: 3}
m_MoveAction: {fileID: 3710738434707379630, guid: 2960912a48c2ae741891e0507263b631,
m_MoveAction: {fileID: 3710738434707379630, guid: ca9f5fa95ffab41fb9a615ab714db018,
type: 3}
m_SubmitAction: {fileID: 2064916234097673511, guid: 2960912a48c2ae741891e0507263b631,
m_SubmitAction: {fileID: 2064916234097673511, guid: ca9f5fa95ffab41fb9a615ab714db018,
type: 3}
m_CancelAction: {fileID: -1967631576421560919, guid: 2960912a48c2ae741891e0507263b631,
m_CancelAction: {fileID: -1967631576421560919, guid: ca9f5fa95ffab41fb9a615ab714db018,
type: 3}
m_LeftClickAction: {fileID: 8056856818456041789, guid: 2960912a48c2ae741891e0507263b631,
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_TrackedDeviceSelectAction: {fileID: 2559092417903258184, guid: ca9f5fa95ffab41fb9a615ab714db018,
type: 3}
m_MiddleClickAction: {fileID: 0}
m_RightClickAction: {fileID: 0}
m_ScrollWheelAction: {fileID: 0}
m_TrackedDevicePositionAction: {fileID: 0}
m_TrackedDeviceOrientationAction: {fileID: 0}
m_TrackedDeviceSelectAction: {fileID: 0}
--- !u!114 &1272049767
MonoBehaviour:
m_ObjectHideFlags: 0
Expand Down
1 change: 1 addition & 0 deletions Assets/TanksDemo/Assets/Scripts/UI/ControlRebindingUI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ void RemapButtonClicked(string name, int bindingIndex = 0)
{
m_Button.enabled = false;
m_Text.text = "Press button/stick for " + name;
m_RebindOperation?.Dispose();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated but just realized that after the recent change to ToHumanReadableString, line 131 should be

        m_Text.text = InputControlPath.ToHumanReadableString(m_Action.bindings[0].effectivePath,
            InputControlPath.HumandReadableStringOptions.OmitDevice);

m_RebindOperation = m_Action.PerformInteractiveRebinding()
.WithControlsExcluding("<Mouse>/position")
.WithControlsExcluding("<Mouse>/delta")
Expand Down
16 changes: 7 additions & 9 deletions Assets/TanksDemo/Assets/TanksInputActions.inputactions
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"path": "<Gamepad>/leftTrigger",
"interactions": "",
"processors": "",
"groups": "",
"groups": "Keyboard&Mouse;Gamepad",
"action": "Brake",
"isComposite": false,
"isPartOfComposite": false
Expand All @@ -64,7 +64,7 @@
"path": "<Gamepad>/leftStick/x",
"interactions": "",
"processors": "",
"groups": "",
"groups": "Keyboard&Mouse;Gamepad",
"action": "Turret",
"isComposite": false,
"isPartOfComposite": false
Expand All @@ -86,7 +86,7 @@
"path": "",
"interactions": "",
"processors": "",
"groups": "",
"groups": "Keyboard&Mouse;Gamepad",
"action": "Turret",
"isComposite": false,
"isPartOfComposite": true
Expand All @@ -97,7 +97,7 @@
"path": "",
"interactions": "",
"processors": "",
"groups": "",
"groups": "Keyboard&Mouse;Gamepad",
"action": "Turret",
"isComposite": false,
"isPartOfComposite": true
Expand All @@ -108,7 +108,7 @@
"path": "<Gamepad>/buttonSouth",
"interactions": "",
"processors": "",
"groups": "",
"groups": "Keyboard&Mouse;Gamepad",
"action": "Fire",
"isComposite": false,
"isPartOfComposite": false
Expand All @@ -119,7 +119,7 @@
"path": "<Gamepad>/start",
"interactions": "",
"processors": "",
"groups": "",
"groups": "Keyboard&Mouse;Gamepad",
"action": "Pause",
"isComposite": false,
"isPartOfComposite": false
Expand All @@ -130,7 +130,7 @@
"path": "<Gamepad>/rightTrigger",
"interactions": "",
"processors": "",
"groups": "",
"groups": "Keyboard&Mouse;Gamepad",
"action": "Gas",
"isComposite": false,
"isPartOfComposite": false
Expand Down Expand Up @@ -244,7 +244,6 @@
"controlSchemes": [
{
"name": "Keyboard&Mouse",
"basedOn": "",
"bindingGroup": "Keyboard&Mouse",
"devices": [
{
Expand All @@ -261,7 +260,6 @@
},
{
"name": "Gamepad",
"basedOn": "",
"bindingGroup": "Gamepad",
"devices": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,9 @@ public void OnGUI()
}
if (GUILayout.Button(m_DeleteButton, EditorStyles.label))
{
// Unfocus controls, because otherwise, the editor can get confused and have text from a text field
// on the deleted item leak to a different field.
GUI.FocusControl(null);
ArrayHelpers.EraseAt(ref m_ParametersForEachListItem, i);
ArrayHelpers.EraseAt(ref m_EditableParametersForEachListItem, i);
m_Apply();
Expand Down
2 changes: 1 addition & 1 deletion Packages/com.unity.inputsystem/InputSystem/InputSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2280,7 +2280,7 @@ internal static void InitializeInEditor(IInputRuntime runtime = null)
{
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. " +
"This means that no input from native devices will come through." +
"\n\nDo you want to enable the backends. Doing so requires a restart of the editor.";
"\n\nDo you want to enable the backends? Doing so requires a restart of the editor.";

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