void SaveRecord() { // In playerprefs PlayerPrefsExt.SetTimeSpanEncrypted(TIME_TRIAL_RECORD_PLAYERPREF_ID, _curRecord); // In google play services if active if (Social.localUser.authenticated) { long miliseconds = _curRecord.Ticks / TimeSpan.TicksPerMillisecond; Social.ReportScore(miliseconds, TIME_TRIAL_LEADERBOARD_ID, (bool success) => {}); } }