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
- Warning of an unknown Script missing is logged when selecting VFX in Play Mode
- Vertical and horizontal scrollbars appear and disappear when dragging an attribute to a different position within the Shader Graph Hierarchy
- AudioSource.PlayDelayed() does not work with Audio Random Containers
- Compatible with the VFX Graph Shader Graph can't be dragged and dropped into the "Output" block from the Project window
- [Silicon] Freeze/crash on BrotliDecoderDecompressStream when using System.IO.Compression.BrotliDecoder.TryDecompress
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.