Skip to content

TimeUtility relies on DateTime #99

@soraphis

Description

@soraphis

s_Timers[name] = DateTime.Now.Ticks;

the TimeUtility class is based on DateTime, which means it breaks when pausing the play mode in the editor (timers should not proceed while paused).

Relying on Time.time OR Time.unscaledTime would pause if the game is paused in the editor (or even paused via timeScale in game, for Time.time)

Also the class is missing a "RuntimeInitializeOnLoad" to clear the static dictionary, which means timers would survive the playmode if the faster-playmode-options are used (https://blog.unity.com/technology/enter-play-mode-faster-in-unity-2019-3)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions