Search Issue Tracker
Fixed in 1.1.0-preview.4
Votes
2
Found in [Package]
1.0-preview
Issue ID
1190502
Regression
No
[InputSystem] Runtime rebinds are leaking into .inputactions asset
User description:
I've tried this again with the latest version that is currently available to download from within Unity
0.9.4-preview.
When following my reproduction steps, I was still able to leak the new input actions onto the .inputactions asset. Even during runtime.
Simply use the code from the example above, although you do have to disable the InputAction actionToUse before you setup and start the rebind operation.
During runtime rebind a key using the previous example With the .inputactions asset window open.
After having remapped a new button, close the .inputactions asset and reopen it again using the Edit asset button.
Notice that the button you pressed now shows up in the .inputactions asset.
Are you still seeing this issue as of 0.9.3? We had a bug where rebinds didn't trigger re-resolving of bindings and thus wouldn't take effect immediately. This has since been fixed.
While the rebind does register into the .inputactions asset. I'm unable to use the newly added key to trigger my debug code. Is there a step I seem to be missing?
In the example gif below. I start off by showcasing my current input actions. I then press the UI button with the name F. Immediately afterwards, I press the A button on my keyboard (sorry, don't have visuals for that). I then close the .inputactions asset. Only to then reopen it. As you can see in the example gif, the newly bound input action was leaked into the .inputactions` asset.
image
Code used:
public void RequestNewBinding() {
InputAction actionToUse = inputActions.actionMaps[0].actions[0];
inputActions.Disable();
actionToUse.Disable();
rebindOperation = actionToUse.PerformInteractiveRebinding().WithRebindAddingNewBinding()
.OnComplete(operation => {
actionToUse.Enable();
inputActions.Enable();
ButtonRebindCompleted(GetComponent<Button>());
})
.Start();
}
private void ButtonRebindCompleted(Button uiButton) {
rebindOperation.Dispose();
buttonText.text = controls.TestMap.Newaction.controls[controls.TestMap.Newaction.controls.Count - 1].displayName;
controls.TestMap.Enable();
}
The rest of the code is still the same as in the original example.
------------
Rene notes: We're indeed performing any destructive operation right on the imported asset instance. Need to solve that. Besides that, there shouldn't be any leaking from there back to the source asset, though. Not sure that is happening here but if it is, that is probably also a problem.
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Rigidbody2D.Slide API does not have the needed configuration when creating a 2D Top-Down character controller
- Opening reference for "Playables"component redirects to a missing page
- Sprite Renderer image is changed when switching Mask Interaction and changing Sprite to a shared Sprite
- An unsigned integer is not compared with an integer correctly in player when using IL2CPP backend
- Graphical artifacts are being rendered in Scenes that are loaded during run-time when GPU Resident Drawer is turned on
Add comment