Search Issue Tracker
Not Reproducible
Votes
4
Found in [Package]
0.2.6-preview
Issue ID
1147560
Regression
No
[Scripting] Input Action fails to re-enable after disabled.
GitHub: https://github.com/Unity-Technologies/InputSystem/issues/538
https://github.com/Unity-Technologies/InputSystem/issues/556
Repro:
1. Download package and project: https://github.com/Unity-Technologies/InputSystem
2. Download attached script
3. Attach the script to any gameobject in any game scene
4. Enter Playmode and press any key on keyboard
5. Observe Console window shows message about Action disabled then enabled.
6. Try press any key again on keyboard
7. (Optional) observe the Input Debugger window for active Actions
Actual: After re-enable an Input Action, it stops working.
Note: I thought this was the same issue as 1140861. It's not.
Comments (2)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Localization Group Rules bypasses Locale logic when SharedGroup asset provided
- UI Toolkit World UI Text Field unfocuses immediately when clicking on it using XR Controller
- Crash on CallWindowProcW when entering Play mode for the second time and running the Editor in the background while using System.Windows.Forms functions
- 2D Freeform Light shadows disappear when light center is offset from shape bounds
- Crash on MarkAllDependencies when opening scenes with Assets from the YarnSpinner package
Heimlink
Apr 25, 2019 03:47
I have added the following comment to the original issue on github.
https://github.com/Unity-Technologies/InputSystem/issues/538
I have noticed that my sample code functions correctly with the latest codebase from the develop branch, i.e. commit d6d3d3285ea0d6f3690aa8f3f5b8ed2b64ec2a35.
(N.B. this issue is still present in the stable 0.2.8-preview)
However, if I add an interaction to the action constructor, e.g.
action = new InputAction("Any button press", "<Gamepad>/<Button>", "Press");
or
action = new InputAction("Any button press", "<Gamepad>/<Button>", "tap");
then the action seems to become functional after delay of a second or so, after being enabled.
So it's certainly an improvement, but still persisting.
peterjackman846
Apr 22, 2019 09:35
Hey guys - I just ran into the same issue but found a workaround. Maybe this will help someone.
Try using a RenderTexture as the target. An easy way to handle this is to link the RenderTexture to a RawImage. When you create the RenderTexture, in the RenderTextureDescriptor,
set: desc.sRGB = false;
Good luck!