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 6d2ed77b..f67d3343 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 e47826d1..ad59cdbb 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 3e519f13..c743d88c 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 @@ -857,13 +857,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()) { @@ -880,7 +884,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 ec9c53e5..2ed7ec74 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 @@ -780,7 +780,8 @@ public void ShowLeaderboardUI(string leaderboardId, LeaderboardTimeSpan span, Ac public void LoadScores(string leaderboardId, LeaderboardStart start, int rowCount, LeaderboardCollection collection, LeaderboardTimeSpan timeSpan, - Action callback) + Action callback, + bool forceReload = false) { using (var client = getLeaderboardsClient()) { @@ -791,7 +792,8 @@ public void LoadScores(string leaderboardId, LeaderboardStart start, leaderboardId, AndroidJavaConverter.ToLeaderboardVariantTimeSpan(timeSpan), AndroidJavaConverter.ToLeaderboardVariantCollection(collection), - rowCount)) + rowCount, + forceReload)) { AndroidTaskUtils.AddOnSuccessListener( task,