Skip to content

fix: Use Time.unscaledDeltaTime instead of Time.deltaTime as time step (#2171)#2183

Closed
PitouGames wants to merge 1 commit intoUnity-Technologies:developfrom
PitouGames:fix/time-scale
Closed

fix: Use Time.unscaledDeltaTime instead of Time.deltaTime as time step (#2171)#2183
PitouGames wants to merge 1 commit intoUnity-Technologies:developfrom
PitouGames:fix/time-scale

Conversation

@PitouGames
Copy link
Copy Markdown
Contributor

This PR fixes the case of Time.timeScale = 0 that stops the NetworkManager to send updates.
It only change the NetworkManager to use Time.unscaledDeltaTime instead of Time.deltaTime (scaled) when advancing the time system.
It has no influence on all projects that always use Time.timeScale = 1.

Changelog

Testing and Documentation

  • Includes unit tests (+ improve existing test).
  • Includes integration tests.
  • Documentation changes may be necessary.

Unity-Technologies#2171)

This fixes the case of Time.timeScale = 0 stopping the NetworkManager to update.
This as no influence on all projects that always have Time.timeScale = 1.

+ Add tests
+ Change existing test using Assert.Equal(boolExpr) to the correct Assert function to display real values expected instead of just "true" or "false"
@PitouGames PitouGames requested a review from a team as a code owner September 8, 2022 19:37
@unity-cla-assistant
Copy link
Copy Markdown

unity-cla-assistant commented Sep 8, 2022

CLA assistant check
All committers have signed the CLA.

@0xFA11 0xFA11 added the good-first-issue Contributions are welcome. Good first issue for newcomers or first time contributors. label Sep 9, 2022
@jeffreyrainy
Copy link
Copy Markdown
Contributor

jeffreyrainy commented Sep 9, 2022

Our CI pipeline requires PR to be from the dev team. I've merged it into
#2187

Thanks for the quality work, including tests and changelog!

@jeffreyrainy
Copy link
Copy Markdown
Contributor

After adjustments, this was merged in as #2187

Thanks! that was a good PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

good-first-issue Contributions are welcome. Good first issue for newcomers or first time contributors.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants