Omni One Unreal SDK 1.1.0
The Omni One Unreal SDK allows for games to interface with the Omni platform service.
|
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. | |
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.
Name | The API name of the achievement. |
Count | The amount to add to the count of the achievement. |
ExtraData | Any additional data that may be necessary. |
InAddCountCallback | A 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. |
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".
Name | The API name of the achievement. |
Fields | A string of '1' and '0' representing the fields. '1' represents a set field, '0' represents an un-set field.. |
ExtraData | Any additional data that may be necessary. |
InAddFieldsCallback | A 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. |
bool FOmniAchievementService::GetAllDefinitions | ( | const int32 | PageIndex, |
const int32 | PageSize, | ||
const FGetAchievementDefinitionsDelegate & | InGetAllDefinitionsCallback | ||
) | const |
Gets information about the definitions of all achievements, supporting pagination.
PageIndex | The page index of the values to return, 0-indexed. |
PageSize | The maximum number of values that should be returned. |
InGetAllDefinitionsCallback | A 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. |
bool FOmniAchievementService::GetAllProgress | ( | const int32 | PageIndex, |
const int32 | PageSize, | ||
const FGetAchievementProgressDelegate & | InGetAllProgressCallback | ||
) | const |
Gets information about the progress of all achievements, supporting pagination.
PageIndex | The page index of the values to return, 0-indexed. |
PageSize | The maximum number of values that should be returned. |
InGetAllProgressCallback | A 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. |
bool FOmniAchievementService::GetDefinitionsByName | ( | const TArray< FString > & | NameArray, |
const FGetAchievementDefinitionsDelegate & | InGetDefinitionsByNameCallback | ||
) | const |
Retrieves information about one or more achievement definitions, by their API names.
NameArray | An array containing the API names of each of the requested achievement definitions. |
InGetDefinitionsByNameCallback | A 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. |
bool FOmniAchievementService::GetProgressByName | ( | const TArray< FString > & | NameArray, |
const FGetAchievementProgressDelegate & | InGetProgressByNameCallback | ||
) | const |
Retrieves information about one or more achievements, by their API names.
NameArray | An array containing the API names of each of the requested achievements. |
InGetProgressByNameCallback | A 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. |
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.
Name | The API Name of the achievement to unlock. |
ExtraData | Any additional data that may be necessary. |
InUnlockCallback | A 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. |