InputSystem icon indicating copy to clipboard operation
InputSystem copied to clipboard

Selecting one action highlights multiple others at the same time (and these are unselectable directly)

Open MetaflameDragon opened this issue 7 years ago • 3 comments

Clicking on actions normally highlights only that button (obviously), but in certain cases it also highlights other (unrelated) actions below it.

2019-04-12_21-10-09 Selecting another item

2019-04-12_21-10-14 Selecting only Hotbar 9 also highlights these three other actions

This issue persists even after closing and reopening the Editor window, and even after recompilation, and always for the same 4 Action buttons.

Used InputActions (DefaultControls.zip)

More details

Trying to select one of these incorrectly highlighted actions (Hotbar 10, Open, Mouse Position) at any time cancels the selection when LMB is released and returns the selection to the last selected item.

Using up/down arrow keys when multiple items are selected always works as if Hotbar 9 had been selected (e.g. selecting Hotbar 10 and pressing down always selects 9 [Keyboard]).

Renaming by double clicking on any of the selected actions starts renaming Hotbar 9 and puts the renaming box in the lowest visible item (e.g. if Mouse Position is offscreen, it gets put in Open).

Right click interaction on any of these actions always targets Hotbar 9.

Adding another action at the bottom of the list does not change the behaviour of the bug.

Inserting the action between the affected buttons does not change the behaviour either - the same 4 buttons still get highlighted, and the inserted Action is not affected. Also, inserting can mess with the insertion target highlighter line thing (notice how it is further down than it should be): 2019-04-12_21-34-53


I've barely done any work with editors, but I suspect this has something to do with incorrect/duplicate Editor GUI IDs?

MetaflameDragon avatar Apr 12 '19 19:04 MetaflameDragon

Hey, @KuboS0S. This indeed has everything to do with duplicated id. If you open the InputAction asset with any text editing software, like Notepad, you can see the 4 actions that are always selected together share exactly the same id. I'm not quite sure how this happened at the first place, but it seems at this point, the only way around this would be create brand new ones to replace them. Thanks for the report. We'll keep an eye for the cause.

JiaUnity avatar Apr 19 '19 00:04 JiaUnity

@KuboS0S Do you happen to remember how you created the actions? (e.g. "Duplicate" from context menu and then renamed/edited) It seems there's some path in the code where we don't properly assign new IDs to actions and thus end up with several actions having the same GUID.

Rene-Damm avatar Apr 24 '19 13:04 Rene-Damm

@Rene-Damm I took a look at my Git history, and what was weird about it was that these duplicate GUIDs have shown up later than when the actions were added. In the initial commit (when I added the .inputactions to my Git rep), the GUIDs were fine and unique, but in the next commit where I set the expected control layout (Button), the GUIDs on these four have also changed.

This was also done in the previous version (back when the Alpha9 key triggered Alpha8).

image Here's the diff. Left is the initial commit, right is the following one. I added a new Action "Mouse Position" and set expectedControlLayout, though I don't remember doing anything to change the IDs.

Pure speculation, but could it have been a product of a multi-select? I know at least it isn't possible now though.

MetaflameDragon avatar Apr 24 '19 17:04 MetaflameDragon