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
- Scene view audio toggle doesn't work after disabling and enabling audio source component with audio random container
- Pitch changes while paused messes up scheduling of the audio random container
- Crash on detail::ComputeShaderSnippetKey when entering the Play mode
- Unable to interact with Material Inspector window when creating a new Material and renaming it
- Shadow artifact is cast onto GameObjects in the Scene view when the Scene view lighting is disabled
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.