This function is part of the Achievements Interface.
Remarks
Register to receive achievement unlocked notifications.
must call EOS_Achievements_RemoveNotifyAchievementsUnlocked to remove the notification
Return Value
handle representing the registered callback
See Also
EOS_Achievements_RemoveNotifyAchievementsUnlocked
Parameters
EOS_Achievements_AddNotifyAchievementsUnlockedV2
Parameter Type And Name | Usage Information |
---|---|
EOS_HAchievements Handle | |
const EOS_Achievements_AddNotifyAchievementsUnlockedV2Options* Options | Structure containing information about the achievement unlocked notification |
void* ClientData | Arbitrary data that is passed back to you in the CompletionDelegate |
const EOS_Achievements_OnAchievementsUnlockedCallbackV2 NotificationFn | A callback that is fired when an achievement unlocked notification for a user has been received |
Callback Function Information
Because this function is asynchronous, it employs a callback of type EOS_Achievements_OnAchievementsUnlockedCallbackV2 to report the results of its operation. See the EOS_Achievements_OnAchievementsUnlockedCallbackV2Info page for more details, or check the [Callback Data] section below.
Callback Remarks
Function prototype definition for notifications that come from EOS_Achievements_AddNotifyAchievementsUnlockedV2
Callback Parameters
EOS_Achievements_OnAchievementsUnlockedCallbackV2
Parameter Type And Name | Usage Information |
---|---|
const EOS_Achievements_OnAchievementsUnlockedCallbackV2Info* Data | An EOS_Achievements_OnAchievementsUnlockedCallbackV2Info containing the output information and result |
Callback Data
The EOS SDK passes the following data structure to the callback function:
EOS_Achievements_OnAchievementsUnlockedCallbackV2Info
Property | Value |
---|---|
void* ClientData | Context that was passed into EOS_Achievements_AddNotifyAchievementsUnlocked |
EOS_ProductUserId UserId | The Product User ID for the user who received the unlocked achievements notification |
const char* AchievementId | The Achievement ID for the achievement that was unlocked. Pass this to EOS_Achievements_CopyPlayerAchievementByAchievementId to get the full achievement information. |
int64_t UnlockTime | POSIX timestamp when the achievement was unlocked. |
For more information, see the EOS_Achievements_OnAchievementsUnlockedCallbackV2Info page.