CustomMatchmakingNGO Class
The class responsible for the matchmaking behaviour when using the Unity Netcode for Gameobjects networking framework.
It implements the CustomMatchmaking.ICustomMatchmakingBehaviour interface and is used by CustomMatchmaking class which handles the non-networking logic.
bool automaticallySignIn[Get]
Indicates whether this component should do the Unity Services login automatically using the SignIn method.
Indicates whether you're currently connected to a game room.
An implementation of the CustomMatchmaking.ICustomMatchmakingBehaviour interface.
string ConnectedRoomToken[Get]
Indicates the token of the game room you're currently connected to.
If not connected this is null. An implementation of the CustomMatchmaking.ICustomMatchmakingBehaviour interface.
bool SupportsRoomPassword[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. An implementation of the CustomMatchmaking.ICustomMatchmakingBehaviour interface.
virtual async Task SignIn ( )
Signs the player in to the Unity Services.
This method is called on awake if automaticallySignIn is set to true.This method may be overriden if the developer wants the sign-in process to be done in a different way.
Creates a new room with the selected roomCreationOptions .
An implementation of the CustomMatchmaking.ICustomMatchmakingBehaviour interface.
ParametersroomCreationOptionsThe selected options for creating a new room.
ReturnsA task you should await for and receive a result with the information on the newly created room.
Joins a room with the selected roomToken and roomPassword .
An implementation of the CustomMatchmaking.ICustomMatchmakingBehaviour interface.
ParametersroomTokenUnique identifier of the room you want to join. This is obtained from the CustomMatchmaking.RoomOperationResult obtained after doing a CreateRoom operation.
roomPasswordOptional password for rooms that require one when joining. This is obtained from the CustomMatchmaking.RoomOperationResult obtained after doing a CreateRoom operation.
ReturnsA task you should await for and receive a result with the information on the newly joined room.
Joins an open room with the selected lobbyName .
An implementation of the CustomMatchmaking.ICustomMatchmakingBehaviour interface.
ParameterslobbyNameIdentifier of the lobby name containing the rooms you want to join. This is the same lobby name used during the CreateRoom(CustomMatchmaking.RoomCreationOptions) operation.
ReturnsA task you should await for and receive a result with the information on the newly joined room.
Leaves the room you're currently connected to.
An implementation of the CustomMatchmaking.ICustomMatchmakingBehaviour interface.