Search Issue Tracker
By Design
Votes
0
Found in
2019.4
2020.3
2021.1
2021.1.3f1
2021.2
2022.1
Issue ID
1343845
Regression
No
PlayableBehaviour.PrepareFrame ignores Time.timeScale when Time.timeScale value does not equal 0 or 1
Steps to reproduce:
1. Open the attached project "Project.zip"
2. Open Scenes/SampleScene
3. Enter the Play Mode
4. Observe the Console window
Expected result: info.deltaTime value equals Time.deltaTime value
Actual result: Time.deltaTime value is 10 times higher than info.deltaTime
Reproducible with: 2019.4.29f1, 2020.3.16f1, 2021.1.17f1, 2021.2.0b7, 2022.1.0a5
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
- Fixing Message Loss in UMPE During Domain Reload
- The Editor freezes when ScheduleReadOnly of IJobParallelForTransform with dependency is used
- Text is truncated in the Inspector when the display scale is set to 150%
- CancellationTokenSource(<timeout>) has incorrect cancellation status when used in WebGL Player
- VFX property value names are cut off when properties with 'Arc' are viewed in the VFX Blackboard
Resolution Note:
FrameData's deltaTime is unscaled by design. Its scaling is different depending on the DirectorUpdateMode. Sometimes Time.timeScale is accounted for, sometimes it's not, depending on the mode. Moreover, nodes in the playable graph can have non-unit speeds, that also change the scale of a particular node's deltaTime (if itself or an ancestor has a non-unit speed). As such, the FrameData's deltaTime should be multiplied by its effectiveSpeed to get the correctly scaled value.
However it's true that the naming is not consistent with Time.deltaTime. Unfortunately, changing the public API is highly risky, as a lot of people may already rely on it. We're going to update the documentation to at least bring to attention that FrameData.deltaTime is unscaled and should be multiplied by effectiveSpeed if the scaling is needed.