How to Get Cumulative Gameplay Time
I'm trying to implement a system where I can get the elapsed time of gameplay taking care to not count the pause and game over periods and also when the application is minimised.
I plan to get a cumulative value over the lifetime of the app on the user's device as they play the game from time to time.
The current idea I've got is to get the period an object in the scene (which is constantly in the scene) is being rendered and stop the timer once the object is no more rendered then adding the time to the cumulative gameplay time and repeating the process again when the game object is being rendered. However, I believe there's a more efficient way of getting this done.
Thanks for the help.
Your answer
Follow this Question
Related Questions
How to Script a 3D game like SOKOBAN GAME 0 Answers
Change scene after event (time or clicking on object) 0 Answers
UI animation when enter trigger, then destroy self after (X) time 0 Answers
Weird result using Time.time 1 Answer
Measuring/finding the height of a stack of game objects then recording that number. 2 Answers