MatchmakingBehaviour
: ICustomMatchmakingBehaviour |
Signature
ICustomMatchmakingBehaviour MatchmakingBehaviour |
onRoomCreationFinished
: UnityEvent< RoomOperationResult > |
Event called when a CreateRoom() operation finished.
Signature
UnityEvent<RoomOperationResult> onRoomCreationFinished |
onRoomJoinFinished
: UnityEvent< RoomOperationResult > |
Event called when a JoinRoom operation finished.
Signature
UnityEvent<RoomOperationResult> onRoomJoinFinished |
onRoomLeaveFinished
: UnityEvent |
Event called when a LeaveRoom operation finished.
Signature
UnityEvent onRoomLeaveFinished |
ConnectedRoomToken
: string
[Get] |
Indicates the token of the game room you're currently connected to.
If not connected this is null.
Signature
string ConnectedRoomToken |
IsConnected
: bool
[Get] |
Indicates whether you're currently connected to a game room.
Signature
bool IsConnected |
IsPasswordProtected
: bool
[Get][Set] |
Signature
bool IsPasswordProtected |
IsPrivate
: bool
[Get][Set] |
Signature
bool IsPrivate |
LobbyName
: string
[Get][Set] |
Signature
string LobbyName |
MaxPlayersPerRoom
: int
[Get][Set] |
Signature
int MaxPlayersPerRoom |
GenerateRoomPassword
()
|
Generates a random room password to be used in the created room when it's requested in a CreateRoom() operation.
May be overriden to implement your own random password generation.
Signature
virtual string GenerateRoomPassword() Returns string
A random room password to be used in the created room.
|
CreateRoom
()
|
Creates a new room with the selected options in the component public fields.
Signature
async Task< RoomOperationResult > CreateRoom() Returns async Task< RoomOperationResult >
A task you should await for and receive a result with the information on the newly created room.
|
CreateRoom
(
options
)
|
Creates a new room with the selected options.
Signature
async Task< RoomOperationResult > CreateRoom(RoomCreationOptions options) Parameters options: RoomCreationOptions
The selected options for creating a new room.
Returns async Task< RoomOperationResult >
A task you should await for and receive a result with the information on the newly created room.
|
JoinOpenRoom
(
roomLobby
)
|
Joins a room with the selected roomLobby .
Signature
async Task< RoomOperationResult > JoinOpenRoom(string roomLobby) Parameters roomLobby: string
Identifier of the room lobby you want to join. This is the same lobby name used in the CreateRoom() and CreateRoom(RoomCreationOptions) operations.
Returns async Task< RoomOperationResult >
A task you should await for and receive a result with the information on the newly joined room.
|
JoinRoom
(
roomToken
, roomPassword
)
|
Joins a room with the selected roomToken and roomPassword .
Signature
async Task< RoomOperationResult > JoinRoom(string roomToken, string roomPassword) Parameters roomToken: string
Unique identifier of the room you want to join. This is obtained from the RoomOperationResult obtained after doing a CreateRoom() operation.
roomPassword: string
Optional password for rooms that require one when joining. This is obtained from the RoomOperationResult obtained after doing a CreateRoom() operation.
Returns async Task< RoomOperationResult >
A task you should await for and receive a result with the information on the newly joined room.
|
LeaveRoom
()
|
Leaves the room you're currently connected to.
Signature
void LeaveRoom() Returns void |
ConnectedRoomToken
: string
[Get] |
Indicates the token of the game room you're currently connected to.
If not connected this is null.
Signature
string ConnectedRoomToken |
IsConnected
: bool
[Get] |
Indicates whether you're currently connected to a game room.
Signature
bool IsConnected |
SupportsRoomPassword
: bool
[Get] |
Indicates whether the implementation of this interface supports room passwords.
This is also used for controlling which fields are shown in the inspector UI of the CustomMatchmaking component.
Signature
bool SupportsRoomPassword |
CreateRoom
(
options
)
|
Creates a new room with the selected options .
Signature
Task< RoomOperationResult > CreateRoom(RoomCreationOptions options) Parameters options: RoomCreationOptions
The selected options for creating a new room.
Returns Task< RoomOperationResult >
A task you should await for and receive a result with the information on the newly created room.
|
JoinOpenRoom
(
lobbyName
)
|
Joins an open room with the selected lobbyName .
Signature
Task< RoomOperationResult > JoinOpenRoom(string lobbyName) Parameters lobbyName: string
Identifier of the lobby name containing the rooms you want to join. This is the same lobby name used during the CreateRoom() operation.
Returns Task< RoomOperationResult >
A task you should await for and receive a result with the information on the newly joined room.
|
JoinRoom
(
roomToken
, roomPassword
)
|
Joins a room with the selected roomToken and roomPassword .
Signature
Task< RoomOperationResult > JoinRoom(string roomToken, string roomPassword=null) Parameters roomToken: string
Unique identifier of the room you want to join. This is obtained from the RoomOperationResult obtained after doing a CreateRoom() operation.
roomPassword: string
Optional password for rooms that require one when joining. This is obtained from the RoomOperationResult obtained after doing a CreateRoom() operation.
Returns Task< RoomOperationResult >
A task you should await for and receive a result with the information on the newly joined room.
|
LeaveRoom
()
|
Leaves the room you're currently connected to.
Signature
void LeaveRoom() Returns void |
IsPrivate
: bool |
Indicates whether this game room is private.
This causes the room to be hidden from a list of available rooms to other players and to only be joined by players who know it's unique identifier and password when one is set.
Signature
bool IsPrivate |
LobbyName
: string |
Name of the game lobby this room belongs to.
Lobbies are often used by networking frameworks to group game rooms by type or map.
Signature
string LobbyName |
MaxPlayersPerRoom
: int |
The maximum number of players allowed per game room.
Signature
int MaxPlayersPerRoom |
RoomPassword
: string |
Optional password to be required for other players to be able to join this game room.
If no password is required this field should not be set or set to null
Signature
string RoomPassword |
ErrorMessage
: string |
Indicates what went wrong in the ICustomMatchmakingBehaviour.CreateRoom operation.
On success this is null.
Signature
string ErrorMessage |
RoomPassword
: string |
Optional password of the created room to be used on ICustomMatchmakingBehaviour.JoinRoom operations.
When not used this is null.
Signature
string RoomPassword |
RoomToken
: string |
Unique identifier of the created room to be used on ICustomMatchmakingBehaviour.JoinRoom operations.
Signature
string RoomToken |
IsSuccess
: bool
[Get] |
Indicates whether the ICustomMatchmakingBehaviour.CreateRoom operation succeeded.
Signature
bool IsSuccess |