Search Issue Tracker
By Design
By Design in 1.11.X, 1.13.X
Votes
3
Found in [Package]
1.11.2
1.13.0
Issue ID
ISXB-1426
Regression
No
The event is triggered when enabling InputAction by another InputAction with the same key
Reproduction steps:
1. Open the attached project "ReproProj"
2. Open the “/Assets/Scenes/SampleScene.unity” Scene
3. Enter the Play Mode
4. Press “1“ key
5. Observe the Console
Expected result: Action 2 is enabled but not triggered
Actual result: Log message “[2282 @ 11.64068: EVENT_OnTriggered] Action2: Started (Just Started: True @ 11.636218)“ is present
Reproducible with: 1.11.2 (2022.3.58f1), 1.13.0 (6000.0.38f1, 6000.1.0b6, 6000.2.0a3)
Reproducible on:
Play Mode
Windows Standalone Player
Testing environment: Windows 10 Enterprise 21H2
Not reproducible on: No other environment tested
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
- Shader Graph Node information is briefly displayed in Graph Inspector when clicking on Category in the Blackboard
- Module installation fails with "Download failed: Validation Failed" errors when using beta.2 Hub version
- JsonConvert conversion fails trying to call GetCallbackMethodsForType when [OnDeserialized] is used in a class
- Shader Graph Category dropdown cannot be expanded/collapsed when clicking on the text
- Different text alignment in the column header in Entities "System" window
Resolution Note:
Thank you for reporting a bug to Unity.
After reviewing the behavior, we've confirmed it aligns with the current design and intended use of the feature. We understand this may differ from your expectations or workflow.
From testing, I noticed that both Action's are enabled in the example you provided, therefore when you try to enable Action2 it is already enabled causing the action to trigger.
When using project wide input assets, all actions are enabled by default. This is opposite to the case when not using the asset, which I know is confusing, but for now this is by design.
To solve your issue in your provided project, you can simply disable Action2 in the Awake function like this:
private void Awake()
{
m_playerInput.onActionTriggered += EVENT_OnTriggered;
m_playerInput.actions.FindActionMap("TestMap").Enable();
DisableAction(m_reference2);
EnableAction(m_reference1);
}
We will close this case as 'As Designed.' If you have feedback on how the feature could better meet your needs, please let us know - we value your input and consider it in future improvements.
Resolution Note (1.11.X):
Thank you for reporting a bug to Unity.
After reviewing the behavior, we've confirmed it aligns with the current design and intended use of the feature. We understand this may differ from your expectations or workflow.
When using project wide input assets, all actions are enabled by default.
In the repo project you provided you are trying to enable an action that is already enabled.
To resolve this you can disable that action in the Awake method like this:
private void Awake()
{
m_playerInput.onActionTriggered += EVENT_OnTriggered;
m_playerInput.actions.FindActionMap("TestMap").Enable();
DisableAction(m_reference2);
EnableAction(m_reference1);
}
I hope that helps!
We will close this case as 'As Designed.' If you have feedback on how the feature could better meet your needs, please let us know - we value your input and consider it in future improvements.
Resolution Note (1.13.X):
Thank you for reporting a bug to Unity.
After reviewing the behavior, we've confirmed it aligns with the current design and intended use of the feature. We understand this may differ from your expectations or workflow.
From testing, I noticed that both Action's are enabled in the example you provided, therefore when you try to enable Action2 it is already enabled causing the action to trigger.
When using project wide input assets, all actions are enabled by default. This is opposite to the case when not using the asset, which I know is confusing, but for now this is by design.
To solve your issue in your provided project, you can simply disable Action2 in the Awake function like this:
private void Awake()
{
m_playerInput.onActionTriggered += EVENT_OnTriggered;
m_playerInput.actions.FindActionMap("TestMap").Enable();
DisableAction(m_reference2);
EnableAction(m_reference1);
}
We will close this case as 'As Designed.' If you have feedback on how the feature could better meet your needs, please let us know - we value your input and consider it in future improvements.