Pico Unreal Platform SDK
FPicoAchievementsInterface Class Reference

PicoAchievementsInterface class. More...

#include <Pico_Achievements.h>

Public Member Functions

bool AddCount (const FString &Name, const int64 &Count, const FString &ExtraData, FAddCount InAddCountDelegate)
 Adds a count to a specified count achievement. The count will be added to the current count, for example, if the current count is 1 and the count you would like to add is 7, the final count will be 8 if the request succeeds. More...
 
bool AddFields (const FString &Name, const FString &Fields, const FString &ExtraData, FAddFields InAddFieldsCallback)
 Unlocks the bit(s) of a specified bitfield achievement. The status of the bit(s) is then unchangeable. More...
 
bool Unlock (const FString &Name, const FString &ExtraData, FUnlock InUnlockCallback)
 Unlocks a specified achievement of any type even if the target for unlocking this achievement is not reached. More...
 
bool GetAllDefinitions (int32 PageIndex, int32 PageSize, FGetAllDefinitions InGetAllDefinitionsCallback)
 Gets the information about all achievements, including API names, descriptions, types, the targets which must be reached to unlock those achievements, and more. More...
 
bool GetAllProgress (int32 PageIndex, int32 PageSize, FGetAllProgress InGetAllProgressCallback)
 Gets the user's progress on all achievements, including API names, whether or not the achievements are unlocked, the time at which they were unlocked, achievement types and, depending on the type, the progress made towards unlocking them, and more. More...
 
bool GetDefinitionsByName (const TArray< FString > &NameArray, FGetDefinitionsByName InGetDefinitionsByNameCallback)
 Gets the information about specified achievements, including API names, descriptions, types, the targets which must be reached to unlock those achievements, and more. More...
 
bool GetProgressByName (const TArray< FString > &NameArray, FGetProgressByName InGetProgressByNameCallback)
 Gets the user's progress on specified achievements, including API names, whether or not the achievements are unlocked, the time at which they were unlocked, achievement types and, depending on the type, the progress made towards unlocking them, and more. More...
 

Detailed Description

PicoAchievementsInterface class.

Member Function Documentation

◆ AddCount()

bool AddCount ( const FString &  Name,
const int64 &  Count,
const FString &  ExtraData,
FAddCount  InAddCountDelegate 
)

Adds a count to a specified count achievement. The count will be added to the current count, for example, if the current count is 1 and the count you would like to add is 7, the final count will be 8 if the request succeeds.

Note
Available to count achievements only.
Parameters
NameThe API name of the achievement.
CountThe count you want to add. The largest count supported by this function is the maximum value of a signed 64-bit integer. If the count is larger than that, it is clamped to that maximum value before being passed to the servers.
ExtraDataCustom extension fields that can be used to record key information when unlocking achievements.
InAddCountDelegateThe API requests to do an AddCount operation, which is processed by the server and returned to the client as a 'success' or 'failure', and possibly other data.
Returns
Bool:
  • true: success
  • false: failure

◆ AddFields()

bool AddFields ( const FString &  Name,
const FString &  Fields,
const FString &  ExtraData,
FAddFields  InAddFieldsCallback 
)

Unlocks the bit(s) of a specified bitfield achievement. The status of the bit(s) is then unchangeable.

Note
Available to bitfield achievements only.
Parameters
NameThe API name of the achievement to unlock bit(s) for.
FieldsA string containing either '0' or '1' characters, for example '100011'. Every '1' will unlock a bit in the corresponding position of a bitfield.
ExtraDataCustom extension fields that can be used to record key information when unlocking achievements.
InAddFieldsCallbackWill be executed when the request has been completed. Delegate will contain the requested object class.
Returns
Bool:
  • true: success
  • false: failure

◆ GetAllDefinitions()

bool GetAllDefinitions ( int32  PageIndex,
int32  PageSize,
FGetAllDefinitions  InGetAllDefinitionsCallback 
)

Gets the information about all achievements, including API names, descriptions, types, the targets which must be reached to unlock those achievements, and more.

Parameters
PageIndexThe start index of the pages.
PageSizeThe size of the page.
InGetAllDefinitionsCallbackWill be executed when the request has been completed. Delegate will contain the requested object class.
Returns
Bool:
  • true: success
  • false: failure

◆ GetAllProgress()

bool GetAllProgress ( int32  PageIndex,
int32  PageSize,
FGetAllProgress  InGetAllProgressCallback 
)

Gets the user's progress on all achievements, including API names, whether or not the achievements are unlocked, the time at which they were unlocked, achievement types and, depending on the type, the progress made towards unlocking them, and more.

Parameters
PageIndexThe start index of the pages.
PageSizeThe size of the page.
InGetAllProgressCallbackWill be executed when the request has been completed. Delegate will contain the requested object class.
Returns
Bool:
  • true: success
  • false: failure

◆ GetDefinitionsByName()

bool GetDefinitionsByName ( const TArray< FString > &  NameArray,
FGetDefinitionsByName  InGetDefinitionsByNameCallback 
)

Gets the information about specified achievements, including API names, descriptions, types, the targets which must be reached to unlock those achievements, and more.

Parameters
NameArrayThe API names of the achievements.
InGetDefinitionsByNameCallbackWill be executed when the request has been completed. Delegate will contain the requested object class.
Returns
Bool:
  • true: success
  • false: failure

◆ GetProgressByName()

bool GetProgressByName ( const TArray< FString > &  NameArray,
FGetProgressByName  InGetProgressByNameCallback 
)

Gets the user's progress on specified achievements, including API names, whether or not the achievements are unlocked, the time at which they were unlocked, achievement types and, depending on the type, the progress made towards unlocking them, and more.

Parameters
NameArrayThe API names of the achievements.
InGetProgressByNameCallbackWill be executed when the request has been completed. Delegate will contain the requested object class.
Returns
Bool:
  • true: success
  • false: failure

◆ Unlock()

bool Unlock ( const FString &  Name,
const FString &  ExtraData,
FUnlock  InUnlockCallback 
)

Unlocks a specified achievement of any type even if the target for unlocking this achievement is not reached.

Parameters
NameThe API name of the achievement to unlock.
ExtraDataCustom extension fields that can be used to record key information when unlocking achievements.
InUnlockCallbackWill be executed when the request has been completed. Delegate will contain the requested object class.
Returns
Bool:
  • true: success
  • false: failure