Meta XR Platform SDK (UPM) v71 Reference Guide
Meta XR Platform SDK (UPM) v71 Reference Guide
Select your platform
No SDKs available
No versions available

Achievements Class

The Achievements API enables developers to create engaging experiences by awarding trophies, badges, and awards for reaching goals. Users can see friends' achievements Achievements.GetAllDefinitions(), fostering competition, and earned achievements are displayed in Meta Quest Home, showcasing progress Achievements.Unlock() and driving engagement.

Static Member Functions

Add 'count' to the achievement with the given name. This must be a COUNT achievement. The largest number that is supported by this method is the max value of a signed 64-bit integer. If the number is larger than that, it is clamped to that max value before being passed to the servers.
Parameters
name
The api_name of the achievement that will be adding count, which can be retrieved by AchievementDefinition::Name.
count
The value of count that will be added to the achievement.
Unlock fields of a BITFIELD achievement.
Parameters
name
The api_name of the Bitfield achievement whose field(s) will be unlocked, which can be retrieved by AchievementDefinition::Name.
fields
A string containing either '0' or '1' characters. Every '1' will unlock the field in the corresponding position.
Retrieve all achievement definitions for the app, including their name, unlock requirements, and any additional details.
Retrieve the progress for the user on all achievements in the app.
Retrieve the achievement definitions that match the specified names, including their name, unlock requirements, and any additional details.
Parameters
names
The api_names of the achievements used to retrieve the definition information, which can be retrieved by AchievementDefinition::Name.
Retrieve the user's progress on the achievements that match the specified names.
Parameters
names
The api_names of the achievements used to retrieve the progress information, which can be retrieved by AchievementDefinition::Name.
Unlock the achievement with the given name. This can be of any achievement type: a simple unlock, count-based, or bitfield-based achievement. The Meta Quest Platform supports three types of achievements: simple, count and bitfield. Each achievement type has a different unlock mechanism. Simple achievements are all-or-nothing. They are unlocked by a single event or objective completion. For example, a simple achievement is unlocked when Frodo reaches Mount Doom. Count achievements are unlocked when a counter reaches a defined target. Define the AchievementDefinition::Target to reach that triggers the achievement. For example, a target achievement is unlocked when Darth Vader chokes 3 disappointing Imperial officers. Bitfield achievements are unlocked when a target number of bits in a bitfield are set. Define the AchievementDefinition::Target and AchievementDefinition::BitfieldLength that triggers the achievement. For example, a bitfield achievement is unlocked when Harry destroys 5 of the 7 Horcruxes.
Parameters
name
The api_name of the achievement that will be unlocked, which can be retrieved by AchievementDefinition::Name.
static Request< Models.AchievementDefinitionList > GetNextAchievementDefinitionListPage
static Request< Models.AchievementProgressList > GetNextAchievementProgressListPage
Did you find this page helpful?
Thumbs up icon
Thumbs down icon