EOS API reference page for EOS_Achievements_UnlockAchievements

This function is part of the Achievements Interface.


Unlocks a number of achievements for a specific player.

Return Value

  • EOS_Success if the operation completes successfully

  • EOS_InvalidParameters if any of the options are incorrect


Parameter Type And Name

Usage Information

EOS_HAchievements Handle

const EOS_Achievements_UnlockAchievementsOptions* Options

Structure containing information about the achievements and the player whose achievements we're unlocking.

void* ClientData

Arbitrary data that is passed back to you in the CompletionDelegate

const EOS_Achievements_OnUnlockAchievementsCompleteCallback CompletionDelegate

This function is called when the unlock achievements operation completes.

This function is asynchronous; the EOS SDK guarantees that your callback (the CompletionDelegate parameter) will run when the operation completes, regardless of whether it succeeds or fails. Use the void* parameter to pass any contextual information the callback may need in order to react properly. Relevant information can be copied from the EOS SDK's cache while the callback function is running. You do not need to remove the callback function.

Callback Function Information

Because this function is asynchronous, it employs a callback of type EOS_Achievements_OnUnlockAchievementsCompleteCallback to report the results of its operation. See the EOS_Achievements_OnUnlockAchievementsCompleteCallbackInfo page for more details, or check the Callback Data section below.

Callback Remarks

Function prototype definition for callbacks passed to EOS_Achievements_UnlockAchievements

Callback Parameters

Parameter Type And Name

Usage Information

const EOS_Achievements_OnUnlockAchievementsCompleteCallbackInfo* Data

An EOS_Achievements_OnUnlockAchievementsCompleteCallbackInfo containing the output information and result

Callback Data

The EOS SDK passes the following data structure to the callback function:




EOS_EResult ResultCode

The EOS_EResult code for the operation. EOS_Success indicates that the operation succeeded; other codes indicate errors.

void* ClientData

Context that was passed into EOS_Achievements_UnlockAchievements.

EOS_ProductUserId UserId

The Product User ID of the user who initiated this request.

uint32_t AchievementsCount

The number of achievements that the operation unlocked.

For more information, see the EOS_Achievements_OnUnlockAchievementsCompleteCallbackInfo page.

Related API Members