![]() |
Essential Kit
|
Provides cross-platform interface to easily integrate popular social gaming functionalities such as achievements, leaderboards on your mobile games. More...
Static Public Member Functions | |
static ILeaderboard | CreateLeaderboard (string leaderboardId) |
Creates a new instance of leaderboard object. | |
static void | LoadLeaderboards (EventCallback< GameServicesLoadLeaderboardsResult > callback) |
Loads the leaderboards. | |
static IAchievement | CreateAchievement (string achievementId) |
Creates a new instance of achievement object. | |
static void | LoadAchievementDescriptions (EventCallback< GameServicesLoadAchievementDescriptionsResult > callback) |
Loads the achievement descriptions from game server. | |
static void | LoadAchievements (EventCallback< GameServicesLoadAchievementsResult > callback) |
Loads previously submitted achievement progress for the current local player. | |
static void | ReportAchievementProgress (string achievementId, double percentageCompleted, CompletionCallback callback) |
Reports the local user's achievement progress to game server, using platform specific id. | |
static void | ReportAchievementProgress (IAchievementDescription achievementDescription, double percentageCompleted, CompletionCallback callback) |
Reports the local user's achievement progress to game server. | |
static void | ReportAchievementProgress (IAchievement achievement, double percentageCompleted, CompletionCallback callback) |
Reports the local user's achievement progress to game server. | |
static void | LoadFriends (EventCallback< GameServicesLoadPlayerFriendsResult > callback) |
Loads the list of friends for the authenticated local player. | |
static void | AddFriend (string playerId, EventCallback< bool > callback) |
Initiates a friend request to the specified player. | |
static void | Authenticate () |
Initiates authentication process for the local player on the device. | |
static void | Signout () |
Signout the local player on the device. | |
static void | ReportScore (string leaderboardId, long value, CompletionCallback callback, string tag=null) |
Reports the score to game server. | |
static void | ReportScore (ILeaderboard leaderboard, long value, CompletionCallback callback, string tag=null) |
Reports the score to game server. | |
static void | ShowLeaderboards (LeaderboardTimeScope timescope=LeaderboardTimeScope.AllTime, EventCallback< GameServicesViewResult > callback=null) |
Opens the standard view to display all the leaderboards. | |
static void | ShowLeaderboard (string leaderboardId, LeaderboardTimeScope timescope=LeaderboardTimeScope.AllTime, EventCallback< GameServicesViewResult > callback=null) |
Opens the standard view to display leaderboard scores corresponding to given id. | |
static void | ShowLeaderboard (ILeaderboard leaderboard, LeaderboardTimeScope timescope=LeaderboardTimeScope.AllTime, EventCallback< GameServicesViewResult > callback=null) |
Opens the standard view to display leaderboard scores corresponding to given leaderboard. | |
static void | ShowAchievements (EventCallback< GameServicesViewResult > callback=null) |
Opens the standard view to display achievement progress screen for the local player. | |
static void | LoadServerCredentials (EventCallback< GameServicesLoadServerCredentialsResult > callback) |
Loads the server credentials. | |
Advanced Usage | |
static void | Initialize (GameServicesUnitySettings settings) |
Initializes game services with custom settings created at runtime. | |
Obsolete methods | |
static void | LoadPlayers (string[] playerIds, EventCallback< GameServicesLoadPlayersResult > callback) |
Loads the player details from game server. | |
static IScore | CreateScore (string leaderboardId) |
Creates the score for specified leaderboard. | |
static IScore | CreateScore (ILeaderboard leaderboard) |
Creates the score for specified leaderboard. | |
Properties | |
static ILocalPlayer | LocalPlayer [get] |
Returns the local player. | |
static bool | IsAuthenticated [get] |
A boolean value indicating whether this local player is authenticated. | |
static ILeaderboard[] | Leaderboards [get] |
Returns the cached leaderboards array. | |
static IAchievementDescription[] | AchievementDescriptions [get] |
Returns the cached achievement description array. | |
static IAchievement[] | Achievements [get] |
Returns the cached achievements array. | |
Events | |
static EventCallback< GameServicesAuthStatusChangeResult > | OnAuthStatusChange |
Event called on local player auth change. | |
Internally, game services feature uses native game servers for handling functionalities. So while running your game on iOS devices, Game Center servers will be used. Whereas on Android platform, Play Game Services server will be used.
Goto iTune's Connect to configure leaderboard, achievemnts for your iOS game. And for Android, add records at Google Developer Console.
|
static |
settings | Settings for the game services. |
References GameServices.AchievementDescriptions, GameServices.Achievements, GameServicesUnitySettings.Achievements, GameServices.Leaderboards, GameServicesUnitySettings.Leaderboards, GameServices.OnAuthStatusChange, and GameServicesUnitySettings.ShowAchievementCompletionBanner.
|
static |
leaderboardId | A string used to uniquely identify the leaderboard. |
Referenced by GameServices.ReportScore().
|
static |
callback | Callback method that will be invoked after operation is completed. |
|
static |
achievementId | A string used to uniquely identify the achievement. |
Referenced by GameServices.ReportAchievementProgress(), and GameServices.ReportAchievementProgress().
|
static |
callback | Callback method that will be invoked after operation is completed. |
|
static |
callback | Callback method that will be invoked after operation is completed. |
|
static |
achievementId | A string used to uniquely identify the achievement. |
percentageCompleted | The value indicates how far the player has progressed. |
callback | Callback that will be called after operation is completed. |
References GameServices.CreateAchievement(), and GameServices.ReportAchievementProgress().
Referenced by GameServices.ReportAchievementProgress(), and GameServices.ReportAchievementProgress().
|
static |
achievementDescription | The achievement description object. |
percentageCompleted | The value indicates how far the player has progressed. |
callback | Callback that will be called after operation is completed. |
References GameServices.CreateAchievement(), IAchievementDescription.Id, and GameServices.ReportAchievementProgress().
|
static |
achievement | The achievement object. |
percentageCompleted | The value indicates how far the player has progressed. |
callback | Callback that will be called after operation is completed. |
References IAchievement.ReportProgress().
|
static |
callback | The callback that will be called after operation is completed. If successful, it will contain the list of friends. |
References GameServices.IsAuthenticated, ILocalPlayer.LoadFriends(), and GameServices.LocalPlayer.
|
static |
playerId | The id of the player to send the request to. |
callback | The callback that will be called after operation is completed. |
References ILocalPlayer.AddFriend(), GameServices.IsAuthenticated, and GameServices.LocalPlayer.
|
static |
leaderboardId | A string used to uniquely identify the leaderboard. |
value | The value of the score. |
callback | Callback that will be called after operation is completed. |
tag | The tag used to identify the score (optional). This needs to be of max length 8 characters in ascii characters. |
References GameServices.CreateLeaderboard(), and GameServices.ReportScore().
Referenced by GameServices.ReportScore().
|
static |
leaderboard | The leaderboard object. |
value | The value of the score. |
callback | Callback that will be called after operation is completed. |
tag | The tag used to identify the score (optional). This needs to be of max length 8 characters in ascii characters. |
References ILeaderboard.ReportScore().
|
static |
timescope | A time filter used to restrict which scores are displayed to the player. |
callback | Callback that will be called after operation is completed. |
|
static |
leaderboardId | A string used to identify the leaderboard. |
timescope | A time filter used to restrict which scores are displayed to the player. |
callback | Callback that will be called after operation is completed. |
null
for leaderboard identifier.
|
static |
leaderboard | The leaderboard object. |
timescope | A time filter used to restrict which scores are displayed to the player. |
callback | Callback that will be called after operation is completed. |
null
for leaderboard identifier. References ILeaderboard.Id, and ILeaderboard.PlatformId.
|
static |
callback | Callback that will be called after operation is completed. |
|
static |
callback | Callback that will be called after operation is completed. |
The server credentials is a set of properties that can be used to connect to game service from your backend.
|
static |
playerIds | An array of player id's whose details has to be retrieved from game server. |
callback | Callback that will be called after operation is completed. |
|
static |
leaderboardId | A string used to uniquely identify the leaderboard. |
|
static |
leaderboard | The leaderboard object. |
|
staticget |
The local player.
Referenced by GameServices.AddFriend(), and GameServices.LoadFriends().
|
staticget |
true
if is authenticated; otherwise, false
.
Referenced by GameServices.AddFriend(), and GameServices.LoadFriends().
|
staticget |
Referenced by GameServices.Initialize().
|
staticget |
Referenced by GameServices.Initialize().
|
staticget |
Referenced by GameServices.Initialize().