- Home /
Question by
unity_ijppmtYzoB0-lw · Feb 04, 2019 at 06:37 PM ·
timerealtimetimers
How to Count quited(program off) time
How to Count time when my game is off? (this is for app) Do I have to call mobile device time?? how?
Comment
Answer by KISP · Feb 04, 2019 at 07:01 PM
You're going to want to look at the DateTime class, OnApplicationPause and OnApplicationQuit. Save the time when the player quits/suspends the app, and upon unsuspending/starting the app, compare the current time to the saved time.