Search Issue Tracker
Fixed in 0.3.0
Votes
0
Found in [Package]
0.2.1-preview
Issue ID
1138249
Regression
Yes
[Scripting] The "duration" value, when read from callback function for Input Actions, is not correct.
Repro:
1. Download package and project at: https://github.com/Unity-Technologies/InputSystem
2. Go to scene at: Assets -> Demo ->SimpleDemo -> SimpleDemo
3. Enter Playmode
4. Hold down left mouse button for a short time, then let it go
5. Observe how long the shooting lasts
Actual: The "duration" value is much longer than the actual time
Note: When using callback function like this:
controls.gameplay.fire.performed +=
ctx =>
{
if (ctx.interaction is SlowTapInteraction)
{
StartCoroutine(BurstFire((int)(ctx.duration * burstSpeed)));
}
else
{
Fire();
}
m_Charging = false;
};
The value for duration is calculated though time and startTime. However, the startTime for callback function is always 0, which makes the duration value much larger than it is.
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Crash on ShaderLab::ShaderState::ApplyShaderState when entering Play Mode and calling ShaderWarmup.WarmupShaderFromCollection with a shader that has dynamic_branch
- Crash on operator delete[] when a serializable structure in the System namespace is serialized by a MonoBehaviour
- [macOS] forward and backward mouse buttons are recognized as middle mouse button
- NavMeshModifier.OnEnable/OnDisable gets progressively slower when called repeatedly
- "System.Net.CookieContainer" throws an "ArgumentException" error when using a non-UTF-8 machine locale and hostname
Add comment