Question by 
               Giampy_Normo · Sep 02, 2021 at 08:06 AM · 
                c#leaderboardsocial  
              
 
              OnApplicationPause Not working
hi everyone, i'm using this script to get the log out login but is not workin. if i put in the OnApplicationPause{} "application.quit" it works but when i put "PlayerPrefs.SetString("Last_Login", DateTime.Now.ToString());" it doesn't works.
 private void OnApplicationQuit() 
     { 
         PlayerPrefs.SetString("Last_Login", DateTime.Now.ToString());
         ScriptAch.SaveLeaderboard();
     }
 
     private void OnApplicationPause(bool pause)
     {
         if(pause == true)
         {
             Application.Quit();
             ScriptAch.SaveLeaderboard();
             //PlayerPrefs.SetString("Last_Login", DateTime.Now.ToString());
         }
     }
               Comment
              
 
               
              Have you tried putting Application.Quit after calling PlayerPrefs.SetString? Have you also tried calling PlayerPrefs.Save before calling Application.Quit? 
Your answer
 
 
             Follow this Question
Related Questions
Google Play Services leaderboard not updating after high score is beaten? 1 Answer
iOS crash on Social Leaderboard LoadScores after upgrading to Unity5 0 Answers
need help with code please 1 Answer
How to have a scoreboard system through multiple objects? 0 Answers
GameCenter daily best score 1 Answer
 koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                