PICO Unreal Platform SDK
FPicoMatchmakingInterface Class Reference

PicoMatchmakingInterface class. More...

#include <Pico_Matchmaking.h>

Public Member Functions

bool ReportResultsInsecure (const FString &RoomID, const TMap< FString, int > &Data, FMatchmakingReportResultsInsecure InDelegate)
 Reports the result of a skill-rating match. More...
 
bool GetStats (const FString &Pool, uint32 MaxLevel, EMatchmakingStatApproach Approach=EMatchmakingStatApproach::Trailing, FMatchmakingGetStats InDelegate=FMatchmakingGetStats())
 Gets the matchmaking statistics for the current user. More...
 
bool Browse2 (const FString &Pool, FPicoMatchmakingOptions MatchmakingOptions, FMatchmakingBrowse2 InDelegate)
 Gets rooms by matchmakinging pool name. The user can join the room with RoomService.Join2 toor cancel the retrieval with MatchmakingService.Cancel. More...
 
bool Browse2CustomPage (const FString &Pool, FPicoMatchmakingOptions MatchmakingOptions, int PageIndex, int PageSize, FMatchmakingBrowse2CustomPage InDelegate)
 Gets rooms by matchmakinging pool name and specify the page number and the number of pages per page. More...
 
bool Cancel (FMatchmakingCancel InDelegate)
 Cancels a matchmaking request. Call this function to cancel an enqueue request before a match is made. This is typically triggered when a user gives up waiting. If you do not cancel the request but the user goes offline, the user/room will be timed out according to the setting of reserved period on the PICO Developer Platform. More...
 
bool CreateAndEnqueueRoom2 (const FString &Pool, FPicoMatchmakingOptions MatchmakingOptions, FMatchmakingCreateAndEnqueueRoom2 InDelegate)
 Creates a matchmaking room, then enqueues and joins it. More...
 
bool Enqueue2 (const FString &pool, FPicoMatchmakingOptions MatchmakingOptions, FMatchmakingEnqueue2 InDelegate)
 Enqueues for an available matchmaking room to join. When the server finds a match, it will return a message of type MessageType.Notification_Matchmaking_MatchFound. You can join found matching rooms by calling RoomService.Join2. If you want to cancel the match early, you can use MatchmakingService.Cancel. More...
 
bool GetAdminSnapshot (FMatchmakingGetAdminSnapshot InDelegate)
 Debugs the state of the current matchmaking pool queue. More...
 
bool StartMatch (const FString &RoomId, FMatchmakingStartMatch InDelegate)
 Reports that a skill-rating match has started. You can use this method after joining the room. More...
 

Detailed Description

PicoMatchmakingInterface class.

Member Function Documentation

◆ Browse2()

bool Browse2 ( const FString &  Pool,
FPicoMatchmakingOptions  MatchmakingOptions,
FMatchmakingBrowse2  InDelegate 
)

Gets rooms by matchmakinging pool name. The user can join the room with RoomService.Join2 toor cancel the retrieval with MatchmakingService.Cancel.

Note
Applicable to the following matchmaking mode: Browse
Parameters
PoolThe matchmaking pool name you want to browse.
MatchmakingOptions(Optional) The matchmaking configuration of the browse request.
InDelegateWill be executed when the request has been completed. Delegate will contain the requested object class (bool, bIsError, int, ErrorCode, const FString&, ErrorMessage, UPico_MatchmakingBrowseResult *, MatchmakingBrowseResult).
Returns
Bool:
  • true: success
  • false: failure


◆ Browse2CustomPage()

bool Browse2CustomPage ( const FString &  Pool,
FPicoMatchmakingOptions  MatchmakingOptions,
int  PageIndex,
int  PageSize,
FMatchmakingBrowse2CustomPage  InDelegate 
)

Gets rooms by matchmakinging pool name and specify the page number and the number of pages per page.

Parameters
PoolThe matchmaking pool name you want to browse.
MatchmakingOptionsThe matchmaking configuration of the browse request.
PageIndexStart page index.
PageSizeThe number of pages per page.
InDelegateWill be executed when the request has been completed. Delegate will contain the requested object class (bool, bIsError, int, ErrorCode, const FString&, ErrorMessage, UPico_MatchmakingBrowseResult *, MatchmakingBrowseResult).
Returns
Bool:
  • true: success
  • false: failure


◆ Cancel()

bool Cancel ( FMatchmakingCancel  InDelegate)

Cancels a matchmaking request. Call this function to cancel an enqueue request before a match is made. This is typically triggered when a user gives up waiting. If you do not cancel the request but the user goes offline, the user/room will be timed out according to the setting of reserved period on the PICO Developer Platform.

Note
Applicable to the following matchmaking modes: Quickmatch, Browse
Parameters
InDelegateWill be executed when the request has been completed. Delegate will contain the requested object class (bool, bIsError, int, ErrorCode, const FString&, ErrorMessage).
Returns
Bool:
  • true: success
  • false: failure


◆ CreateAndEnqueueRoom2()

bool CreateAndEnqueueRoom2 ( const FString &  Pool,
FPicoMatchmakingOptions  MatchmakingOptions,
FMatchmakingCreateAndEnqueueRoom2  InDelegate 
)

Creates a matchmaking room, then enqueues and joins it.

Note
Applicable to the following matchmaking modes: Quickmatch, Browse, Advanced (Can Users Create Rooms=true)
Parameters
poolThe matchmaking pool to use, which is created on the PICO Developer Platform.
MatchmakingOptions(Optional) Additional matchmaking configuration for this request.
InDelegateWill be executed when the request has been completed. Delegate will contain the requested object class (bool, bIsError, int, ErrorCode, const FString&, ErrorMessage, UPico_MatchmakingEnqueueResultAndRoom *, MatchmakingEnqueueResultAndRoom).
Returns
Bool:
  • true: success
  • false: failure


◆ Enqueue2()

bool Enqueue2 ( const FString &  pool,
FPicoMatchmakingOptions  MatchmakingOptions,
FMatchmakingEnqueue2  InDelegate 
)

Enqueues for an available matchmaking room to join. When the server finds a match, it will return a message of type MessageType.Notification_Matchmaking_MatchFound. You can join found matching rooms by calling RoomService.Join2. If you want to cancel the match early, you can use MatchmakingService.Cancel.

Note
Applicable to the following matchmaking mode: Quickmatch
Parameters
poolThe matchmaking pool to use, which is defined on the PICO Developer Platform.
MatchmakingOptions(Optional) Match configuration for Enqueue.
InDelegateWill be executed when the request has been completed. Delegate will contain the requested object class (bool, bIsError, int, ErrorCode, const FString&, ErrorMessage, UPico_MatchmakingEnqueueResult *, MatchmakingEnqueueResult).
Returns
Bool:
  • true: success
  • false: failure


◆ GetAdminSnapshot()

bool GetAdminSnapshot ( FMatchmakingGetAdminSnapshot  InDelegate)

Debugs the state of the current matchmaking pool queue.

Note
  • This function should not be used in production.
  • Applicable to the following matchmaking modes: Quickmatch, Browse
Parameters
InDelegateWill be executed when the request has been completed. Delegate will contain the requested object class (bool, bIsError, int, ErrorCode, const FString&, ErrorMessage, UPico_MatchmakingAdminSnapshot *, MatchmakingAdminSnapshot).
Returns
Bool:
  • true: success
  • false: failure


◆ GetStats()

bool GetStats ( const FString &  Pool,
uint32  MaxLevel,
EMatchmakingStatApproach  Approach = EMatchmakingStatApproach::Trailing,
FMatchmakingGetStats  InDelegate = FMatchmakingGetStats() 
)

Gets the matchmaking statistics for the current user.

Note
Applicable to the following matchmaking modes: Quickmatch, Browse
Parameters
PoolThe pool to look in.
MaxLevel(beta feature, don't use it)
approach(beta feature, don't use it)
InDelegateWill be executed when the request has been completed. Delegate will contain the requested object class (bool, bIsError, int, ErrorCode, const FString&, ErrorMessage, UPico_MatchmakingStats *, MatchmakingStats).
Returns
Bool:
  • true: success
  • false: failure


◆ ReportResultsInsecure()

bool ReportResultsInsecure ( const FString &  RoomID,
const TMap< FString, int > &  Data,
FMatchmakingReportResultsInsecure  InDelegate 
)

Reports the result of a skill-rating match.

Note
Applicable to the following matchmaking modes: Quickmatch, Browse (+ Skill Pool)
Parameters
RoomIDThe ID of the room.
DataThe key-value pairs.
InDelegateWill be executed when the request has been completed. Delegate will contain the requested object class (bool, bIsError, int, ErrorCode, const FString&, ErrorMessage).
Returns
Bool:
  • true: success
  • false: failure


◆ StartMatch()

bool StartMatch ( const FString &  RoomId,
FMatchmakingStartMatch  InDelegate 
)

Reports that a skill-rating match has started. You can use this method after joining the room.

Note
  • This function is only for pools with skill-based matching.
  • Applicable to the following matchmaking modes: Quickmatch, Browse (+ Skill Pool)
Parameters
RoomIdThe ID of the room you want to match.
InDelegateWill be executed when the request has been completed. Delegate will contain the requested object class (bool, bIsError, int, ErrorCode, const FString&, ErrorMessage).
Returns
Bool:
  • true: success
  • false: failure