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
- [Android][iOS] The keyboard closes and re-opens when consecutive input fields are selected
- Complex Sub Graph connected to a Voronoi node is ignored when the shader gets applied as a Material
- Compute Shader property not set error when entering play mode with path tracing and PBR sky
- "WebGL Publish" detects WebGL module and allows building when it is installed without restarting the project
- Editor is non-responsive and flickers when multiple Water System instances are enabled
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.