Player Statistics
Overview
The BrainCloudPlayerStatistics service is used for all user-scoped statistics operations, including Player Experience (XP).
User Stats must be pre-defined from the Statistics Rules - User Statistics page of the brainCloud portal. If instead you need to create them dynamically at runtime, you can enable the Generate User Statistic Rule Enabled setting on the Advanced Settings page of your app in the brainCloud portal.
API Summary
The following operations are for user statistics:
- ReadAllUserStats - returns the complete list of user stats
- ReadUserStatsSubset - returns a specified stats to the client
- ReadUserStatsForCategory - returns the specified category of stats to the client
- IncrementUserStats - perform increment/decrement operations on the statistics
- ProcessStatistics - perform operations on the statistics according to the stats grammar.
- ResetAllUserStats - resets all user statistics to their initial values (as defined by their rules). Useful for debugging.
The following operations are specific to the XP system:
- IncrementExperiencePoints – award XP to the user
- GetNextExperienceLevel – returns information about the next experience level, including associated rewards
- SetExperiencePoints - used to specifically set XP (useful for debugging). Does not generate any associated rewards for levelling-up
📄️ GetNextExperienceLevel
Overview
📄️ IncrementExperiencePoints
Overview
📄️ IncrementUserStats
Overview
📄️ ProcessStatistics
Overview
📄️ ReadAllUserStats
Overview
📄️ ReadUserStatsForCategory
Overview
📄️ ReadUserStatsSubset
Overview
📄️ ResetAllUserStats
Overview
📄️ SetExperiencePoints
Overview