check time since player last played the game ?

I want to save the time in in player prefs when a player quits the game, and when they start the game again check how many seconds have gone by since that saved time.

I know it has something to do with DateTime but I am not sure how to set it up.

Thanks in advance!

Assuming you already saved the last time variable, simply use the following

public float DifferenceTime = System.DateTime.Now - lastTimeSaved ;

Super easy :smiley:

PS: You might want to take a look at the System DateTime docs for mono - mono - Mono Documentation