diff --git a/Assets/Public/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/DummyClient.cs b/Assets/Public/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/DummyClient.cs index 269a4695..7be240d6 100644 --- a/Assets/Public/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/DummyClient.cs +++ b/Assets/Public/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/DummyClient.cs @@ -218,7 +218,8 @@ public void LoadScores( int rowCount, LeaderboardCollection collection, LeaderboardTimeSpan timeSpan, - Action callback) + Action callback, + bool forceReload = false) { LogUsage(); if (callback != null) diff --git a/Assets/Public/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/IPlayGamesClient.cs b/Assets/Public/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/IPlayGamesClient.cs index 795b250b..8a5d27fb 100644 --- a/Assets/Public/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/IPlayGamesClient.cs +++ b/Assets/Public/GooglePlayGames/com.google.play.games/Runtime/Scripts/BasicApi/IPlayGamesClient.cs @@ -298,9 +298,14 @@ void ShowLeaderboardUI(string leaderboardId, LeaderboardTimeSpan span, /// leaderboard timespan /// callback with the scores, and a page token. /// The token can be used to load next/prev pages. + /// + /// If true, this call will clear any locally cached data and attempt to + /// fetch the latest data from the server. This would commonly be used for something like a + /// user-initiated refresh. Normally, this should be set to {@code false} to gain advantages + /// of data caching. void LoadScores(string leaderboardId, LeaderboardStart start, int rowCount, LeaderboardCollection collection, LeaderboardTimeSpan timeSpan, - Action callback); + Action callback, bool forceReload = false); /// /// Loads the more scores for the leaderboard. diff --git a/Assets/Public/GooglePlayGames/com.google.play.games/Runtime/Scripts/ISocialPlatform/PlayGamesPlatform.cs b/Assets/Public/GooglePlayGames/com.google.play.games/Runtime/Scripts/ISocialPlatform/PlayGamesPlatform.cs index 3151bcd2..30af5e73 100644 --- a/Assets/Public/GooglePlayGames/com.google.play.games/Runtime/Scripts/ISocialPlatform/PlayGamesPlatform.cs +++ b/Assets/Public/GooglePlayGames/com.google.play.games/Runtime/Scripts/ISocialPlatform/PlayGamesPlatform.cs @@ -858,13 +858,17 @@ public void LoadScores(string leaderboardId, Action callback) /// Collection. social or public /// Time span. daily, weekly, all-time /// Callback to invoke when completed. + /// If true, this call will clear any locally cached data and + /// attempt to fetch the latest data from the server. Normally, this should be set to {@code + /// false} to gain advantages of data caching. public void LoadScores( string leaderboardId, LeaderboardStart start, int rowCount, LeaderboardCollection collection, LeaderboardTimeSpan timeSpan, - Action callback) + Action callback, + bool forceReload = false) { if (!IsAuthenticated()) { @@ -881,7 +885,8 @@ public void LoadScores( rowCount, collection, timeSpan, - callback); + callback, + forceReload); } /// diff --git a/Assets/Public/GooglePlayGames/com.google.play.games/Runtime/Scripts/Platforms/Android/AndroidClient.cs b/Assets/Public/GooglePlayGames/com.google.play.games/Runtime/Scripts/Platforms/Android/AndroidClient.cs index 8e5e1b3a..a0c3b476 100644 --- a/Assets/Public/GooglePlayGames/com.google.play.games/Runtime/Scripts/Platforms/Android/AndroidClient.cs +++ b/Assets/Public/GooglePlayGames/com.google.play.games/Runtime/Scripts/Platforms/Android/AndroidClient.cs @@ -759,7 +759,9 @@ public void ShowLeaderboardUI(string leaderboardId, LeaderboardTimeSpan span, Ac public void LoadScores(string leaderboardId, LeaderboardStart start, int rowCount, LeaderboardCollection collection, - LeaderboardTimeSpan timeSpan, Action callback) + LeaderboardTimeSpan timeSpan, + Action callback, + bool forceReload = false) { using (var client = getLeaderboardsClient()) { @@ -770,7 +772,8 @@ public void LoadScores(string leaderboardId, LeaderboardStart start, leaderboardId, AndroidJavaConverter.ToLeaderboardVariantTimeSpan(timeSpan), AndroidJavaConverter.ToLeaderboardVariantCollection(collection), - rowCount)) + rowCount, + forceReload)) { AndroidTaskUtils.AddOnSuccessListener( task,