EOS_Achievements_AddNotifyAchievementsUnlockedV2

EOS API reference page for EOS_Achievements_AddNotifyAchievementsUnlockedV2

3 분 소요

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 NameUsage Information
EOS_HAchievements Handle
const EOS_Achievements_AddNotifyAchievementsUnlockedV2Options* OptionsStructure containing information about the achievement unlocked notification
void* ClientDataArbitrary data that is passed back to you in the CompletionDelegate
const EOS_Achievements_OnAchievementsUnlockedCallbackV2 NotificationFnA 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 NameUsage Information
const EOS_Achievements_OnAchievementsUnlockedCallbackV2Info* DataAn 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

PropertyValue
void* ClientDataContext that was passed into EOS_Achievements_AddNotifyAchievementsUnlocked
EOS_ProductUserId UserIdThe Product User ID for the user who received the unlocked achievements notification
const char* AchievementIdThe Achievement ID for the achievement that was unlocked. Pass this to EOS_Achievements_CopyPlayerAchievementByAchievementId to get the full achievement information.
int64_t UnlockTimePOSIX timestamp when the achievement was unlocked.

For more information, see the EOS_Achievements_OnAchievementsUnlockedCallbackV2Info page.