PICO Unreal Platform SDK
UOnlinePicoLeaderboardsFunction Class Reference

OnlinePicoLeaderboards Blueprint Function class. More...

#include <Pico_Leaderboards.h>

Static Public Member Functions

static void Get (UObject *WorldContextObject, const FString &LeaderboardName, FGet InGetDelegate)
 Gets a specified leaderboard. More...
 
static void GetEntries (UObject *WorldContextObject, const FString &LeaderboardName, int PageIdx, int PageSize, ELeaderboardFilterType Filter, ELeaderboardStartAt StartAt, FGetEntries InGetEntriesDelegate)
 Gets a list of leaderboard entries. More...
 
static void GetEntriesAfterRank (UObject *WorldContextObject, const FString &LeaderboardName, int PageIdx, int PageSize, const FString &AfterRank, FGetEntriesAfterRank InGetEntriesAfterRankDelegate)
 Gets the leaderboard entries after a specified ranking. More...
 
static void GetEntriesByIds (UObject *WorldContextObject, const FString &LeaderboardName, int PageIdx, int PageSize, ELeaderboardStartAt StartAt, const TArray< FString > &UserIDs, FGetEntriesByIds InGetEntriesByIdsDelegate)
 Gets the leaderboard entries for specified user(s). More...
 
static void WriteEntry (UObject *WorldContextObject, const FString &LeaderboardName, const FString &Score, const FString &ExtraData, bool ForceUpdate, FWriteEntry InWriteEntryDelegate)
 Writes a user's score to the leaderboard. More...
 
static void WriteEntryWithSupplementaryMetric (UObject *WorldContextObject, const FString &LeaderboardName, const FString &Score, const FString &SupplementaryMetric, const FString &ExtraData, bool ForceUpdate, FWriteEntryWithSupplementaryMetric InWriteEntryWithSupplementaryMetricDelegate)
 Adds custom contents when writing a user's score to a leaderboard. More...
 

Detailed Description

OnlinePicoLeaderboards Blueprint Function class.

Member Function Documentation

◆ Get()

static void Get ( UObject *  WorldContextObject,
const FString &  LeaderboardName,
FGet  InGetDelegate 
)
static

Gets a specified leaderboard.

Parameters
WorldContextObjectUsed to get the information about the current world.
leaderboardNameLeaderboard name.
InGetDelegateWill be executed when the request has been completed. Delegate will contain the requested object class (bool, bIsError, const FString&, ErrorMessage, UPico_LeaderboardArray *, LeaderboardList).

◆ GetEntries()

static void GetEntries ( UObject *  WorldContextObject,
const FString &  LeaderboardName,
int  PageIdx,
int  PageSize,
ELeaderboardFilterType  Filter,
ELeaderboardStartAt  StartAt,
FGetEntries  InGetEntriesDelegate 
)
static

Gets a list of leaderboard entries.

Parameters
WorldContextObjectUsed to get the information about the current world.
leaderboardNameLeaderboard name.
pageSizeThe number of entries to return on each page.
pageIdxDefines which page of entries to return. The value = (The target page No.)-1. For example, if you want to get the first page of entries, pass 0; if you want to get the second page of entries, pass 1.
filterRestricts the scope of entries to return:
  • NONE: returns all entries of the specified leaderboard
  • FRIENDS: returns the entries of the friends of the current logged-in user
  • USER_IDS(do not pass this value): returns the entries of specified users
startAtDefines where to start returning challenge entries, the enumerations are:
  • 0: Top (return entries from top 1)
  • 1: CenteredOnViewer (place the current logged-in user's entry in the middle of the list on the first page. For example, if the total number of entries is 10, pageSize is set to 5, and the user's rank is top 5, the ranks displayed on the first page will be top 3, 4, 5, 6, and 7. Top 1 and 2 will not be displayed, and top 8, 9, and 10 will be displayed on the second page)
  • 2: CenteredOnViewerOrTop (place the current logged-in user's entry on the top of the list on the first page. For example, if the total number of entries is 10, pageSize is set to 5, and the user's rank is top 5, the ranks displayed on the first page will be top 5, 6, 7, 8, and 9. Top 1, 2, 3, and 4 will not be displayed, and top 10 will be displayed on the second page)
InGetEntriesDelegateWill be executed when the request has been completed. Delegate will contain the requested object class (bool, bIsError, const FString&, ErrorMessage, UPico_LeaderboardEntryArray *, LeaderboardEntryList).

◆ GetEntriesAfterRank()

static void GetEntriesAfterRank ( UObject *  WorldContextObject,
const FString &  LeaderboardName,
int  PageIdx,
int  PageSize,
const FString &  AfterRank,
FGetEntriesAfterRank  InGetEntriesAfterRankDelegate 
)
static

Gets the leaderboard entries after a specified ranking.

Parameters
WorldContextObjectUsed to get the information about the current world.
leaderboardNameLeaderboard name.
pageSizeThe number of entries to return on each page.
pageIdxDefines which page of entries to return. The value = (The target page No.)-1. For example, if you want to get the first page of entries, pass 0; if you want to get the second page of entries, pass 1.
AfterRankDefines after which rank to return entries.
InGetEntriesAfterRankDelegateWill be executed when the request has been completed. Delegate will contain the requested object class (bool, bIsError, const FString&, ErrorMessage, UPico_LeaderboardEntryArray *, LeaderboardEntryList).

◆ GetEntriesByIds()

static void GetEntriesByIds ( UObject *  WorldContextObject,
const FString &  LeaderboardName,
int  PageIdx,
int  PageSize,
ELeaderboardStartAt  StartAt,
const TArray< FString > &  UserIDs,
FGetEntriesByIds  InGetEntriesByIdsDelegate 
)
static

Gets the leaderboard entries for specified user(s).

Parameters
WorldContextObjectUsed to get the information about the current world.
leaderboardNameLeaderboard name.
pageSizeThe number of entries to return on each page.
pageIdxDefines which page of entries to return. The value = (The target page No.)-1. For example, if you want to get the first page of entries, pass 0; if you want to get the second page of entries, pass 1.
startAtDefines where to start returning challenge entries, the enumerations are:
  • 0: Top (return entries from top 1)
  • 1: CenteredOnViewer (place the current logged-in user's entry in the middle of the list on the first page. For example, if the total number of entries is 10, pageSize is set to 5, and the user's rank is top 5, the ranks displayed on the first page will be top 3, 4, 5, 6, and 7. Top 1 and 2 will not be displayed, and top 8, 9, and 10 will be displayed on the second page)
  • 2: CenteredOnViewerOrTop (place the current logged-in user's entry on the top of the list on the first page. For example, if the total number of entries is 10, pageSize is set to 5, and the user's rank is top 5, the ranks displayed on the first page will be top 5, 6, 7, 8, and 9. Top 1, 2, 3, and 4 will not be displayed, and top 10 will be displayed on the second page)
userIDsUser ID(s).
InGetEntriesByIdsDelegateWill be executed when the request has been completed. Delegate will contain the requested object class (bool, bIsError, const FString&, ErrorMessage, UPico_LeaderboardEntryArray *, LeaderboardEntryList).

◆ WriteEntry()

static void WriteEntry ( UObject *  WorldContextObject,
const FString &  LeaderboardName,
const FString &  Score,
const FString &  ExtraData,
bool  ForceUpdate,
FWriteEntry  InWriteEntryDelegate 
)
static

Writes a user's score to the leaderboard.

Parameters
WorldContextObjectUsed to get the information about the current world.
leaderboardNameLeaderboard name.
scoreThe user's score.
extraDataCustom extension fields that can be used to record key information when writing the user's score.
forceUpdateWhether to force a leaderboard update:
  • true: make a force update
  • false: no force update
    Parameters
    InWriteEntryDelegateWill be executed when the request has been completed. Delegate will contain the requested object class (bool, bIsError, const FString&, ErrorMessage, bool, WriteResult).

◆ WriteEntryWithSupplementaryMetric()

static void WriteEntryWithSupplementaryMetric ( UObject *  WorldContextObject,
const FString &  LeaderboardName,
const FString &  Score,
const FString &  SupplementaryMetric,
const FString &  ExtraData,
bool  ForceUpdate,
FWriteEntryWithSupplementaryMetric  InWriteEntryWithSupplementaryMetricDelegate 
)
static

Adds custom contents when writing a user's score to a leaderboard.

Parameters
WorldContextObjectUsed to get the information about the current world.
leaderboardNameLeaderboard name.
scoreThe user's score.
supplementaryMetricCustom contents, such as a video.
extraDataCustom extension fields that can be used to record key information when writing the custom contents.
forceUpdateWhether to force a leaderboard update:
  • true: make a force update
  • false: no force update
    Parameters
    InWriteEntryWithSupplementaryMetricDelegateWill be executed when the request has been completed. Delegate will contain the requested object class (bool, bIsError, const FString&, ErrorMessage, bool, WriteResult).