I'm trying to make a simple console application and don't want to use Unity, but I want to implement a timer, so I would want to use Time.deltaTime.
1 Answer
It is done by calling a timer every frame per second that holds the time between now and last call in milliseconds. Thereafter the resulting number (delta time) is used to calculate how far, for instance, a video game character would have travelled during that time.
-
1\$\begingroup\$ This answer would be better if it included code showing how to do that. \$\endgroup\$– DMGregory ♦Jul 2, 2022 at 12:36
Time.deltaTime
is a Unity specific thing. If you want one in console application you can use a 3rd party lib or write your own.Time.deltaTime
is calculated as time between frames, so if there are no frames and Unity engine is not running - the value probably won't be calculated. That is my assumption. Even if the value would be calculated it would be completely irrelevant value to console application. \$\endgroup\$