Omni One Unreal SDK 1.1.0
The Omni One Unreal SDK allows for games to interface with the Omni platform service.
Loading...
Searching...
No Matches
FOmniAchievementService

Description

Service for accessing and updating achievement information.

The Achievements service is able to access and update information about the current user's achievement progress, as well as access information about each of the project's achievements as defined in the Developer Portal.

#include <OmniAchievementService.h>

Inherits FOmniPlatformServiceBase.

Public Member Functions

bool AddCount (const FString &Name, const int64 &Count, const FString &ExtraData, const FUpdateAchievementDelegate &InAddCountCallback) const
 Updates a count achievement, adding the passed-in amount to the previous count of the achievement.
 
bool AddFields (const FString &Name, const FString &Fields, const FString &ExtraData, const FUpdateAchievementDelegate &InAddFieldsCallback) const
 Updates a bitfield achievement.
 
bool Unlock (const FString &Name, const FString &ExtraData, const FUpdateAchievementDelegate &InUnlockCallback) const
 Unlocks the specified achievement.
 
bool GetProgressByName (const TArray< FString > &NameArray, const FGetAchievementProgressDelegate &InGetProgressByNameCallback) const
 Retrieves information about one or more achievements, by their API names.
 
bool GetAllProgress (const int32 PageIndex, const int32 PageSize, const FGetAchievementProgressDelegate &InGetAllProgressCallback) const
 Gets information about the progress of all achievements, supporting pagination.
 
bool GetDefinitionsByName (const TArray< FString > &NameArray, const FGetAchievementDefinitionsDelegate &InGetDefinitionsByNameCallback) const
 Retrieves information about one or more achievement definitions, by their API names.
 
bool GetAllDefinitions (const int32 PageIndex, const int32 PageSize, const FGetAchievementDefinitionsDelegate &InGetAllDefinitionsCallback) const
 Gets information about the definitions of all achievements, supporting pagination.
 

Methods

◆ AddCount()

bool FOmniAchievementService::AddCount ( const FString &  Name,
const int64 &  Count,
const FString &  ExtraData,
const FUpdateAchievementDelegate &  InAddCountCallback 
) const

Updates a count achievement, adding the passed-in amount to the previous count of the achievement.

Parameters
NameThe API name of the achievement.
CountThe amount to add to the count of the achievement.
ExtraDataAny additional data that may be necessary.
InAddCountCallbackA callback that will be executed when the service has retrieved the information. bool bIsError, const FString& ErrorMessage, UOmniAchievementUpdate* (null in error cases) are passed as parameters.
Returns
True if the request was sent successfully, false otherwise.

◆ AddFields()

bool FOmniAchievementService::AddFields ( const FString &  Name,
const FString &  Fields,
const FString &  ExtraData,
const FUpdateAchievementDelegate &  InAddFieldsCallback 
) const

Updates a bitfield achievement.

Sets provided fields of a bitfield achievement. un-set fields can be set this way, but already-set fields will remain set. For example, if an achievement has fields "00001", and this method is called with fields "10000", the new fields of the achievement would be "10001".

Parameters
NameThe API name of the achievement.
FieldsA string of '1' and '0' representing the fields. '1' represents a set field, '0' represents an un-set field..
ExtraDataAny additional data that may be necessary.
InAddFieldsCallbackA callback that will be executed when the service has retrieved the information. bool bIsError, const FString& ErrorMessage, UOmniAchievementUpdate* (null in error cases) are passed as parameters.
Returns
True if the request was sent successfully, false otherwise.

◆ GetAllDefinitions()

bool FOmniAchievementService::GetAllDefinitions ( const int32  PageIndex,
const int32  PageSize,
const FGetAchievementDefinitionsDelegate &  InGetAllDefinitionsCallback 
) const

Gets information about the definitions of all achievements, supporting pagination.

Parameters
PageIndexThe page index of the values to return, 0-indexed.
PageSizeThe maximum number of values that should be returned.
InGetAllDefinitionsCallbackA callback that will be executed when the service has retrieved the information. bool bIsError, const FString& ErrorMessage, UOmniAchievementDefinitionArray* (null in error cases) are passed as parameters.
Returns
True if the request was sent successfully, false otherwise.

◆ GetAllProgress()

bool FOmniAchievementService::GetAllProgress ( const int32  PageIndex,
const int32  PageSize,
const FGetAchievementProgressDelegate &  InGetAllProgressCallback 
) const

Gets information about the progress of all achievements, supporting pagination.

Parameters
PageIndexThe page index of the values to return, 0-indexed.
PageSizeThe maximum number of values that should be returned.
InGetAllProgressCallbackA callback that will be executed when the service has retrieved the information. bool bIsError, const FString& ErrorMessage, UOmniAchievementProgressArray* (null in error cases) are passed as parameters.
Returns
True if the request was sent successfully, false otherwise.

◆ GetDefinitionsByName()

bool FOmniAchievementService::GetDefinitionsByName ( const TArray< FString > &  NameArray,
const FGetAchievementDefinitionsDelegate &  InGetDefinitionsByNameCallback 
) const

Retrieves information about one or more achievement definitions, by their API names.

Parameters
NameArrayAn array containing the API names of each of the requested achievement definitions.
InGetDefinitionsByNameCallbackA callback that will be executed when the service has retrieved the information. bool bIsError, const FString& ErrorMessage, UOmniAchievementDefinitionArray* (null in error cases) are passed as parameters.
Returns
True if the request was sent successfully, false otherwise.

◆ GetProgressByName()

bool FOmniAchievementService::GetProgressByName ( const TArray< FString > &  NameArray,
const FGetAchievementProgressDelegate &  InGetProgressByNameCallback 
) const

Retrieves information about one or more achievements, by their API names.

Parameters
NameArrayAn array containing the API names of each of the requested achievements.
InGetProgressByNameCallbackA callback that will be executed when the service has retrieved the information. bool bIsError, const FString& ErrorMessage, UOmniAchievementProgressArray* (null in error cases) are passed as parameters.
Returns
True if the request was sent successfully, false otherwise.

◆ Unlock()

bool FOmniAchievementService::Unlock ( const FString &  Name,
const FString &  ExtraData,
const FUpdateAchievementDelegate &  InUnlockCallback 
) const

Unlocks the specified achievement.

This will work for all achievements, not just Simple ones.

Parameters
NameThe API Name of the achievement to unlock.
ExtraDataAny additional data that may be necessary.
InUnlockCallbackA callback that will be executed when the service has retrieved the information. bool bIsError, const FString& ErrorMessage, UOmniAchievementUpdate* (null in error cases) are passed as parameters.
Returns
True if the request was sent successfully, false otherwise.