### Add player data example Source: https://docs.unity3d.com/Packages/com.unity.services.multiplayer%402.3/api/Unity.Services.Lobbies.UpdatePlayerOptions.html Example showing how to add a 'colour' player data. ```csharp var redColourPlayerData = new PlayerDataObject(VisibilityOptions.Public, "red") var data = new Dictionary { ["colour"] = redColourPlayerData }; LobbyService.Instance.UpdatePlayerAsync("lobbyId", "playerId", data); ``` -------------------------------- ### Remove player data example Source: https://docs.unity3d.com/Packages/com.unity.services.multiplayer%402.3/api/Unity.Services.Lobbies.UpdatePlayerOptions.html Example showing how to remove the 'colour' player data. ```csharp var data = new Dictionary { ["colour"] = null }; LobbyService.Instance.UpdatePlayerAsync("lobbyId", "playerId", data); ``` -------------------------------- ### StartAsync(NetworkConfiguration) Source: https://docs.unity3d.com/Packages/com.unity.services.multiplayer%402.3/api/Unity.Services.Multiplayer.INetworkHandler.html Configures and starts networking as a server, host, or client. This method is called when a session starts. ```APIDOC ## StartAsync(NetworkConfiguration) ### Description Configures and starts networking as a server, host, or client. ### Declaration ```csharp Task StartAsync(NetworkConfiguration configuration) ``` ### Parameters - **configuration** (NetworkConfiguration) - The network configuration to be used. ### Returns - **Task** - A Task representing the asynchronous operation. ### Remarks Use Role to determine the role along with all networking details. After the returned task completes, the game should be either listening and accepting connections (host or server) or connected (client). For direct networking, the handler is allowed to modify the publish port UpdatePublishPort(ushort) to handle the case of port 0. ``` -------------------------------- ### Update player data to null example Source: https://docs.unity3d.com/Packages/com.unity.services.multiplayer%402.3/api/Unity.Services.Lobbies.UpdatePlayerOptions.html Example showing how to update the 'colour' player data to null. ```csharp var nullPlayerDataObject = new PlayerDataObject(VisibilityOptions.Public, null) var data = new Dictionary { ["colour"] = nullPlayerDataObject }; LobbyService.Instance.UpdatePlayerAsync("lobbyId", "playerId", data); ``` -------------------------------- ### Matchmaker Environment Config example Source: https://docs.unity3d.com/Packages/com.unity.services.multiplayer%402.3/manual/Matchmaker/Authoring/matchmaker-assets.html Example of a Matchmaker Environment Config file. It sets the enabled flag to true and specifies the default queue name as "default-queue". ```json { "enabled": true, "defaultQueueName": "default-queue" } ``` -------------------------------- ### QuickJoinRequest.Player Property Source: https://docs.unity3d.com/Packages/com.unity.services.multiplayer%402.3/api/Unity.Services.Lobbies.Models.QuickJoinRequest.html Gets the player associated with the QuickJoinRequest. ```APIDOC ## Player Property ### Description The player parameter of QuickJoinRequest. ### Declaration public Player Player { get; } ### Property Value - **Type**: Player - **Description**: The player object. ``` -------------------------------- ### Get sorted QoS results for all regions Source: https://docs.unity3d.com/Packages/com.unity.services.multiplayer%402.3/manual/QoS/index.html Get QoS results for all regions of the 'relay' service, sorted by latency and packet loss. Pass null to get all regions. ```csharp try { var qosResults = await QosService.Instance.GetSortedQosResultsAsync("relay", null); } catch (Exception e) { Debug.Log(e); } ``` -------------------------------- ### StartDirectNetworkAsync(DirectNetworkOptions) Source: https://docs.unity3d.com/Packages/com.unity.services.multiplayer%402.3/api/Unity.Services.Multiplayer.IHostSessionNetwork.html Starts the session associated network as a direct network using the provided options. ```APIDOC ## StartDirectNetworkAsync(DirectNetworkOptions) ### Description Starts the session associated network as a direct network using the provided options. ### Method StartDirectNetworkAsync ### Parameters - **networkOptions** (DirectNetworkOptions) - Required - The options used to configure the direct network, including port settings and other network parameters. ### Returns - **Task** - A task that will be completed when the network is started. ### Exceptions - **ArgumentNullException** - Thrown when `networkOptions` is `null`. ``` -------------------------------- ### WithBackfillingConfiguration Source: https://docs.unity3d.com/Packages/com.unity.services.multiplayer%402.3/api/Unity.Services.Multiplayer.BackfillingConfiguration.html Static factory method to create a BackfillingConfiguration with configurable options for enabling backfilling, automatic player removal, auto-start behavior, player connection timeout, and backfill loop interval. ```APIDOC ## WithBackfillingConfiguration(bool, bool, bool, int, int) ### Description Creates a backfilling configuration for a session. ### Method WithBackfillingConfiguration ### Signature public static BackfillingConfiguration WithBackfillingConfiguration(bool enable = true, bool automaticallyRemovePlayers = true, bool autoStart = true, int playerConnectionTimeout = 30, int backfillingLoopInterval = 1) ### Parameters - **enable** (bool) - Optional - Allow the matchmaker to backfill the session if it is not full, not locked and not private. - **automaticallyRemovePlayers** (bool) - Optional - Define if players leaving the session are automatically removed from the backfill. If set to false, players leaving the session will stay in the backfill ticket preventing them from joining again. - **autoStart** (bool) - Optional - Define if the backfilling will start automatically when a player is missing. If set to false, it is possible to start backfilling manually using StartBackfilling() on the Session. - **playerConnectionTimeout** (int) - Optional - The time in seconds that a player who was added from backfilling has to connect to a session before being automatically removed. Default value is 30 seconds. If value is set to 0, the player will never be removed. - **backfillingLoopInterval** (int) - Optional - The time between each backfill approval request. Default value is 1 second. Value is invalid if below 0. ### Returns - **BackfillingConfiguration** - The BackfillingConfiguration. ### Exceptions - **SessionException** - Thrown when `playerConnectionTimeout` is less than `0` or when `backfillingLoopInterval` is less than `1`. ``` -------------------------------- ### PoolOverrideId Source: https://docs.unity3d.com/Packages/com.unity.services.multiplayer%402.3/api/Unity.Services.Matchmaker.Models.Override.html Gets the id of the pool that overrides the base pool. If null, the ticket falls into the control group and gets assigned the base pool. ```APIDOC ## PoolOverrideId ### Description Gets the id of the pool that overrides the base pool. If null, the ticket falls into the control group and gets assigned the base pool. ### Property Value - **string** - The pool override ID. ``` -------------------------------- ### QuickJoinRequest Constructor Source: https://docs.unity3d.com/Packages/com.unity.services.multiplayer%402.3/api/Unity.Services.Lobbies.Models.QuickJoinRequest.html Creates a new QuickJoinRequest instance with optional filter and player parameters. ```APIDOC ## QuickJoinRequest(List, Player) ### Description Initializes a new instance of the QuickJoinRequest class. ### Constructor QuickJoinRequest(List filter = null, Player player = null) ### Parameters - **filter** (List) - Optional - A list of filters which can be used to narrow down which lobbies to attempt to join. - **player** (Player) - Optional - The player parameter. ``` -------------------------------- ### Get QoS results for specific regions Source: https://docs.unity3d.com/Packages/com.unity.services.multiplayer%402.3/manual/QoS/index.html Get QoS results for a refined set of regions. The regions list must be populated before calling; obtaining it is outside the QoS SDK scope. ```csharp try { var regions = new List(); var qosResults = await QosService.Instance.GetSortedQosResultsAsync("relay", regions); } catch (Exception e) { Debug.Log(e); } ``` -------------------------------- ### NetworkEndpointAddress.Port Source: https://docs.unity3d.com/Packages/com.unity.services.multiplayer%402.3/api/Unity.Services.Multiplayer.NetworkEndpointAddress.html Gets the port of the endpoint. ```APIDOC ## Property: Port ### Description Gets the port of the endpoint. ### Declaration ```csharp public ushort Port { get; } ``` ### Property Value - **ushort** - The port number. ``` -------------------------------- ### CreateTicketAsync(List, CreateTicketOptions) Source: https://docs.unity3d.com/Packages/com.unity.services.multiplayer%402.3/api/Unity.Services.Matchmaker.IMatchmakerService.html Creates a matchmaking ticket effectively starting matchmaking. Async Operation. ```APIDOC ## CreateTicketAsync(List, CreateTicketOptions) ### Description Creates a matchmaking ticket effectively starting matchmaking. Async Operation. ### Method CreateTicketAsync ### Parameters - **players** (List) - Required - List of players to be added to the ticket (should include at least 1 player) - **options** (CreateTicketOptions) - Required - Options for creating the ticket. ### Returns - **Task** - Task for a Response object that includes the identifier of the created ticket. ### Exceptions - **MatchmakerServiceException** - An exception for the Matchmaker SDK containing reason for failure, messages, and any inner exceptions. ``` -------------------------------- ### MatchIdAssignment.Status Source: https://docs.unity3d.com/Packages/com.unity.services.multiplayer%402.3/api/Unity.Services.Matchmaker.Models.MatchIdAssignment.html Gets the status of the assignment. ```APIDOC ## Property Status ### Description The status of the assignment is one of Timeout, Failed, InProgress, Found. ### Declaration ```csharp [Preserve] [JsonConverter(typeof(StringEnumConverter))] [DataMember(Name = "status", EmitDefaultValue = false)] public MatchIdAssignment.StatusOptions Status { get; } ``` ### Property Value - **Type**: MatchIdAssignment.StatusOptions ``` -------------------------------- ### StartRelayNetworkAsync(RelayNetworkOptions) Source: https://docs.unity3d.com/Packages/com.unity.services.multiplayer%402.3/api/Unity.Services.Multiplayer.IHostSessionNetwork.html Starts the session associated network as a relay network. ```APIDOC ## StartRelayNetworkAsync(RelayNetworkOptions) ### Description Starts the session associated network as a relay network. ### Method StartRelayNetworkAsync ### Parameters - **networkOptions** (RelayNetworkOptions) - Required - The options used to configure the relay network. ### Returns - **Task** - A task that will be completed when the network is started. ### Exceptions - **ArgumentNullException** - Thrown when `networkOptions` is `null`. ``` -------------------------------- ### TokenValue Source: https://docs.unity3d.com/Packages/com.unity.services.multiplayer%402.3/api/Unity.Services.Lobbies.Models.TokenData.html Gets the value of the token. ```APIDOC ## TokenValue ### Description Gets the value of the token. ### Declaration ```csharp [Preserve] [DataMember(Name = "tokenValue", EmitDefaultValue = false)] public string TokenValue { get; } ``` ### Property Value - **string** - The value of the token. ``` -------------------------------- ### StartBackfillingAsync(ISession) Source: https://docs.unity3d.com/Packages/com.unity.services.multiplayer%402.3/api/Unity.Services.Multiplayer.MatchmakerServerExtensions.html Starts the backfilling process for a session created through matchmaking and the Matchmaker service. ```APIDOC ## StartBackfillingAsync(ISession) ### Description Starts the backfilling process of a session that was created through matchmaking and the Matchmaker service. ### Method StartBackfillingAsync ### Signature `public static Task StartBackfillingAsync(this ISession session)` ### Parameters - **session** (ISession) - Required - The session to start the backfilling process on. ### Returns - **Task** - A Task representing the asynchronous operation. ``` -------------------------------- ### StartFailed Source: https://docs.unity3d.com/Packages/com.unity.services.multiplayer%402.3/api/Unity.Services.Multiplayer.IHostSessionNetwork.html Event raised when the operation to start the network fails. ```APIDOC ## StartFailed ### Description Raised when the operation to start the network fails. ### Declaration ```csharp event Action StartFailed; ``` ### Event Type | Type | Description | | --- | --- | | Action | The event handler that receives the error information. | ``` -------------------------------- ### ISession.State Source: https://docs.unity3d.com/Packages/com.unity.services.multiplayer%402.3/api/Unity.Services.Multiplayer.ISession.html Gets the current state of the session. ```APIDOC ## ISession.State ### Description Gets the current state of the session. ### Declaration ```csharp SessionState State { get; } ``` ### Property Value | Type | Description | |--------------|-------------| | SessionState | | ``` -------------------------------- ### QuickJoinOptions Class Source: https://docs.unity3d.com/Packages/com.unity.services.multiplayer%402.3/api/Unity.Services.Multiplayer.QuickJoinOptions.html Documentation for the QuickJoinOptions class, including its properties for configuring quick join behavior. ```APIDOC ## Class QuickJoinOptions ### Description Options to provide quick join filters, timeout and backup flow. ### Namespace Unity.Services.Multiplayer ### Assembly Unity.Services.Multiplayer.dll ### Syntax ```csharp public class QuickJoinOptions ``` ### Properties #### CreateSession Determines if a session is created if none is found. ```csharp public bool CreateSession { get; set; } ``` **Property Value** | Type | Description | |------|-------------| | bool | | #### Filters The filters to apply to the session quick join. ```csharp public List Filters { get; set; } ``` **Property Value** | Type | Description | |------|-------------| | List | | #### Timeout The matchmaking timeout in seconds. ```csharp public TimeSpan Timeout { get; set; } ``` **Property Value** | Type | Description | |------|-------------| | TimeSpan | | ``` -------------------------------- ### ISession.Players Source: https://docs.unity3d.com/Packages/com.unity.services.multiplayer%402.3/api/Unity.Services.Multiplayer.ISession.html Gets the list of players in the session. ```APIDOC ## ISession.Players ### Description Gets the list of players in the session. ### Declaration ```csharp IReadOnlyList Players { get; } ``` ### Property Value | Type | Description | |-------------------------------|-------------| | IReadOnlyList | | ``` -------------------------------- ### ISession.PlayerCount Source: https://docs.unity3d.com/Packages/com.unity.services.multiplayer%402.3/api/Unity.Services.Multiplayer.ISession.html Gets the player count of the session. ```APIDOC ## ISession.PlayerCount ### Description Gets the player count of the session. ### Declaration ```csharp int PlayerCount { get; } ``` ### Property Value | Type | Description | |------|-------------| | int | | ``` -------------------------------- ### ConnectionDetails Constructor Source: https://docs.unity3d.com/Packages/com.unity.services.multiplayer%402.3/api/Unity.Services.Matchmaker.Models.ConnectionDetails.html Initializes a new instance of the ConnectionDetails class with a value and type. ```APIDOC ## ConnectionDetails(object value, Type type) ### Description Initializes a new instance of the ConnectionDetails class with the specified value and type. ### Method Constructor ### Signature `public ConnectionDetails(object value, Type type)` ### Parameters - **value** (object) - The value as an object for ConnectionDetails. - **type** (Type) - The type for ConnectionDetails. ``` -------------------------------- ### ListenIPAddress(string) Source: https://docs.unity3d.com/Packages/com.unity.services.multiplayer%402.3/api/Unity.Services.Multiplayer.ListenIPAddress.html Initializes a new instance of the ListenIPAddress struct from the specified IP address string. ```APIDOC ## ListenIPAddress(string) ### Description Initializes a new instance of the ListenIPAddress struct from the specified IP address string. ### Declaration ```csharp public ListenIPAddress(string address) ``` ### Parameters - **address** (string) - Required - The IPv4 or IPv6 address to parse. ### Exceptions - **ArgumentException** - Thrown if the provided address is not a valid IP address. ``` -------------------------------- ### ISession.Host Source: https://docs.unity3d.com/Packages/com.unity.services.multiplayer%402.3/api/Unity.Services.Multiplayer.ISession.html Gets the PlayerID of the session host. ```APIDOC ## ISession.Host ### Description Gets the PlayerID of the session host. ### Declaration ```csharp string Host { get; } ``` ### Property Value | Type | Description | |--------|-------------| | string | | ``` -------------------------------- ### PlayerProperty Class Source: https://docs.unity3d.com/Packages/com.unity.services.multiplayer%402.3/api/Unity.Services.Multiplayer.PlayerProperty.html Documentation for the PlayerProperty class, including its constructor and properties. ```APIDOC ## PlayerProperty Class ### Description Represents a property of a player. ### Namespace Unity.Services.Multiplayer ### Assembly Unity.Services.Multiplayer.dll ### Syntax ```csharp public class PlayerProperty ``` ### Constructors #### PlayerProperty(string, VisibilityPropertyOptions) Creates a new PlayerProperty. ##### Declaration ```csharp public PlayerProperty(string value = null, VisibilityPropertyOptions visibility = VisibilityPropertyOptions.Public) ``` ##### Parameters - **value** (string) - The value of the property. - **visibility** (VisibilityPropertyOptions) - The visibility of the property. ### Properties #### Value The value of the property. ##### Declaration ```csharp public string Value { get; } ``` ##### Property Value - **Value** (string) - The value of the property. #### Visibility The visibility of the property. ##### Declaration ```csharp public VisibilityPropertyOptions Visibility { get; } ``` ##### Property Value - **Visibility** (VisibilityPropertyOptions) - The visibility of the property. ``` -------------------------------- ### ISession.CurrentPlayer Source: https://docs.unity3d.com/Packages/com.unity.services.multiplayer%402.3/api/Unity.Services.Multiplayer.ISession.html Gets the current player in the session. ```APIDOC ## ISession.CurrentPlayer ### Description Gets the current player in the session. ### Declaration ```csharp IPlayer CurrentPlayer { get; } ``` ### Property Value | Type | Description | |--------|-------------| | IPlayer | | ``` -------------------------------- ### QuickJoinLobbyOptions Class Source: https://docs.unity3d.com/Packages/com.unity.services.multiplayer%402.3/api/Unity.Services.Lobbies.QuickJoinLobbyOptions.html The QuickJoinLobbyOptions class provides optional parameters for quick joining a lobby. It includes a Filter property to narrow down lobby selection and a Player property to specify player information. ```APIDOC ## QuickJoinLobbyOptions Class ### Description Optional parameters for Quick Joining a Lobby. Includes queryable fields for Lobby selection criterion. ### Namespace Unity.Services.Lobbies ### Assembly Unity.Services.Multiplayer.dll ### Syntax ```csharp public class QuickJoinLobbyOptions ``` ### Properties #### Filter A list of filters which can be used to narrow down which lobbies to attempt to join. **Declaration** ```csharp public List Filter { get; set; } ``` **Property Value** | Type | Description | |------|-------------| | List | | #### Player Information about a specific player joining the lobby. **Declaration** ```csharp public Player Player { get; set; } ``` **Property Value** | Type | Description | |------|-------------| | Player | | ``` -------------------------------- ### KeyValuePair.Value Property Source: https://docs.unity3d.com/Packages/com.unity.services.multiplayer%402.3/api/Unity.Services.Relay.Models.KeyValuePair.html Gets the value of the KeyValuePair. ```APIDOC ## KeyValuePair.Value ### Description Parameter value of KeyValuePair. ### Property public string Value { get; } ### Property Value - **string** - The value. ``` -------------------------------- ### KeyValuePair.Key Property Source: https://docs.unity3d.com/Packages/com.unity.services.multiplayer%402.3/api/Unity.Services.Relay.Models.KeyValuePair.html Gets the key of the KeyValuePair. ```APIDOC ## KeyValuePair.Key ### Description Parameter key of KeyValuePair. ### Property public string Key { get; } ### Property Value - **string** - The key value. ``` -------------------------------- ### Add a colour property Source: https://docs.unity3d.com/Packages/com.unity.services.multiplayer%402.3/api/Unity.Services.Multiplayer.IHostSession.html Example showing how to add a 'colour' property to the session using SetProperty and then save it with SavePropertiesAsync. ```csharp var redColourProperty = new SessionProperty("red", VisibilityOptions.Public); myHostSession.SetProperty("colour", redColourProperty); await myHostSession.SavePropertiesAsync(); ``` -------------------------------- ### Region Source: https://docs.unity3d.com/Packages/com.unity.services.multiplayer%402.3/api/Unity.Services.Relay.Models.AllocationRequest.html Gets the region in which to create this allocation. ```APIDOC ## Region ### Description The region in which to create this allocation. Get a list of supported values from the `/regions` endpoint or omit this parameter to use the default region. ### Property Value - **Type**: string ### Example ```csharp string region = request.Region; ``` ``` -------------------------------- ### MatchIdAssignment(string, string, StatusOptions, string) Source: https://docs.unity3d.com/Packages/com.unity.services.multiplayer%402.3/api/Unity.Services.Matchmaker.Models.MatchIdAssignment.html Constructor for the MatchIdAssignment class. ```APIDOC ## MatchIdAssignment Constructor ### Description Creates an instance of MatchIdAssignment. ### Declaration ```csharp [Preserve] public MatchIdAssignment(string assignmentType, string message = null, MatchIdAssignment.StatusOptions status = (MatchIdAssignment.StatusOptions)0, string matchId = null) ``` ### Parameters - **assignmentType** (string) - Required - assignmentType param - **message** (string) - Optional - message param - **status** (MatchIdAssignment.StatusOptions) - Optional - The status of the assignment is one of Timeout, Failed, InProgress, Found - **matchId** (string) - Optional - Unique ID of the match. ``` -------------------------------- ### Lobby.Id Source: https://docs.unity3d.com/Packages/com.unity.services.multiplayer%402.3/api/Unity.Services.Lobbies.Models.Lobby.html Gets the unique identifier of the lobby. ```APIDOC ## Lobby.Id Property ### Description Parameter id of Lobby ### Declaration ```csharp [Preserve] [DataMember(Name = "id", EmitDefaultValue = false)] public string Id { get; } ``` ### Property Value - **string** - The lobby ID. ``` -------------------------------- ### JoinAllocationAllOf(byte[]) Constructor Source: https://docs.unity3d.com/Packages/com.unity.services.multiplayer%402.3/api/Unity.Services.Relay.Models.JoinAllocationAllOf.html Creates an instance of JoinAllocationAllOf with the given host connection data. ```APIDOC ## JoinAllocationAllOf(byte[]) ### Description Creates an instance of JoinAllocationAllOf with the specified host connection data. ### Method Constructor ### Parameters - **hostConnectionData** (byte[]) - Required - A base64-encoded representation of an encrypted connection data blob describing the allocation and Relay server of the player who created the join code. Connecting players can use this data to establish communication with the host player. ### Declaration ```csharp [Preserve] public JoinAllocationAllOf(byte[] hostConnectionData) ``` ``` -------------------------------- ### Lobby.Created Source: https://docs.unity3d.com/Packages/com.unity.services.multiplayer%402.3/api/Unity.Services.Lobbies.Models.Lobby.html Gets the timestamp when the lobby was created. ```APIDOC ## Lobby.Created Property ### Description When the lobby was created. The timestamp is in UTC and conforms to ISO 8601. ### Declaration ```csharp [Preserve] [DataMember(Name = "created", EmitDefaultValue = false)] public DateTime Created { get; } ``` ### Property Value - **DateTime** - The creation timestamp. ``` -------------------------------- ### BaseSessionOptions Source: https://docs.unity3d.com/Packages/com.unity.services.multiplayer%402.3/api/Unity.Services.Multiplayer.BaseSessionOptions.html Documentation for the BaseSessionOptions class, including its properties and extension methods. ```APIDOC ## Class BaseSessionOptions ### Description Common options for all session flows. ### Inheritance - object - BaseSessionOptions - JoinSessionOptions - SessionOptions ### Namespace Unity.Services.Multiplayer ### Assembly Unity.Services.Multiplayer.dll ### Syntax ```csharp public abstract class BaseSessionOptions ``` ### Properties #### PlayerProperties Custom game-specific properties that apply to an individual player (e.g. 'role' or 'skill'). ##### Declaration ```csharp public Dictionary PlayerProperties { get; set; } ``` ##### Property Value | Type | Description | |------|-------------| | Dictionary | | ##### Remarks Up to 10 properties may be set per player. Player properties have different visibility levels. ##### See Also - SessionOptions - JoinSessionOptions #### Type The session type is a client-side key used to uniquely identify a session. ##### Declaration ```csharp public string Type { get; set; } ``` ##### Property Value | Type | Description | |------|-------------| | string | | ##### See Also - SessionOptions - JoinSessionOptions ### Extension Methods - SessionOptionsExtensions.WithHostMigration(T) - SessionOptionsExtensions.WithHostMigration(T, IMigrationDataHandler) - SessionOptionsExtensions.WithHostMigration(T, IMigrationDataHandler, TimeSpan, TimeSpan) - SessionOptionsExtensions.WithNetworkHandler(T, INetworkHandler) - SessionOptionsExtensions.WithNetworkOptions(T, NetworkOptions) - SessionOptionsExtensions.WithPlayerName(T, VisibilityPropertyOptions) ### See Also - SessionOptions - JoinSessionOptions ``` -------------------------------- ### IpPortConnectionDetails Class Source: https://docs.unity3d.com/Packages/com.unity.services.multiplayer%402.3/api/Unity.Services.Matchmaker.Models.IpPortConnectionDetails.html Documentation for the IpPortConnectionDetails class, including its constructor and properties. ```APIDOC ## Class IpPortConnectionDetails ### Description Represents IP port connection details for a matchmaker model. ### Namespace Unity.Services.Matchmaker.Models ### Assembly Unity.Services.Multiplayer.dll ### Syntax ```csharp [Preserve] [DataContract(Name = "IpPortConnectionDetails")] public class IpPortConnectionDetails ``` ### Constructors #### IpPortConnectionDetails(string type, string ip = null, int port = 0, Dictionary customData = null) Creates an instance of IpPortConnectionDetails. ##### Declaration ```csharp [Preserve] public IpPortConnectionDetails(string type, string ip = null, int port = 0, Dictionary customData = null) ``` ##### Parameters - **type** (string) - Required - type param - **ip** (string) - Optional - ip param - **port** (int) - Optional - port param - **customData** (Dictionary) - Optional - customData param ### Properties #### CustomData Parameter customData of IpPortConnectionDetails ##### Declaration ```csharp [Preserve] [JsonConverter(typeof(JsonObjectCollectionConverter))] [DataMember(Name = "customData", EmitDefaultValue = false)] public Dictionary CustomData { get; } ``` ##### Property Value - **Dictionary** - The custom data. #### Ip Parameter ip of IpPortConnectionDetails ##### Declaration ```csharp [Preserve] [DataMember(Name = "ip", EmitDefaultValue = false)] public string Ip { get; } ``` ##### Property Value - **string** - The IP address. #### Port Parameter port of IpPortConnectionDetails ##### Declaration ```csharp [Preserve] [DataMember(Name = "port", EmitDefaultValue = false)] public int Port { get; } ``` ##### Property Value - **int** - The port number. #### Type Parameter type of IpPortConnectionDetails ##### Declaration ```csharp [Preserve] [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)] public string Type { get; } ``` ##### Property Value - **string** - The type of connection. ``` -------------------------------- ### MatchIdAssignment.Message Source: https://docs.unity3d.com/Packages/com.unity.services.multiplayer%402.3/api/Unity.Services.Matchmaker.Models.MatchIdAssignment.html Gets the message parameter of MatchIdAssignment. ```APIDOC ## Property Message ### Description Parameter message of MatchIdAssignment. ### Declaration ```csharp [Preserve] [DataMember(Name = "message", EmitDefaultValue = false)] public string Message { get; } ``` ### Property Value - **Type**: string ``` -------------------------------- ### TokenData(string tokenValue = null, string uri = null) Source: https://docs.unity3d.com/Packages/com.unity.services.multiplayer%402.3/api/Unity.Services.Lobbies.Models.TokenData.html Constructor for TokenData. Initializes a new instance with the token value and optional URI. ```APIDOC ## TokenData(string tokenValue = null, string uri = null) ### Description Initializes a new instance of the TokenData class with the specified token value and optional URI. ### Declaration ```csharp [Preserve] public TokenData(string tokenValue = null, string uri = null) ``` ### Parameters - **tokenValue** (string) - Optional - The value of the token. - **uri** (string) - Optional - The URI of the token, if applicable. ``` -------------------------------- ### MatchIdAssignment.MatchId Source: https://docs.unity3d.com/Packages/com.unity.services.multiplayer%402.3/api/Unity.Services.Matchmaker.Models.MatchIdAssignment.html Gets the unique ID of the match. ```APIDOC ## Property MatchId ### Description Unique ID of the match. ### Declaration ```csharp [Preserve] [DataMember(Name = "matchId", EmitDefaultValue = false)] public string MatchId { get; } ``` ### Property Value - **Type**: string ``` -------------------------------- ### MatchIdAssignment.AssignmentType Source: https://docs.unity3d.com/Packages/com.unity.services.multiplayer%402.3/api/Unity.Services.Matchmaker.Models.MatchIdAssignment.html Gets the assignmentType parameter of MatchIdAssignment. ```APIDOC ## Property AssignmentType ### Description Parameter assignmentType of MatchIdAssignment. ### Declaration ```csharp [Preserve] [DataMember(Name = "assignmentType", IsRequired = true, EmitDefaultValue = true)] public string AssignmentType { get; } ``` ### Property Value - **Type**: string ``` -------------------------------- ### MigrationDataInfo Class Source: https://docs.unity3d.com/Packages/com.unity.services.multiplayer%402.3/api/Unity.Services.Lobbies.Models.MigrationDataInfo.html Documentation for the MigrationDataInfo class, including its constructor and properties. ```APIDOC ## MigrationDataInfo Class ### Description Represents the migration data information of a lobby, including URLs for reading and writing migration data, expiration time, and maximum size. ### Namespace Unity.Services.Lobbies.Models ### Assembly Unity.Services.Multiplayer.dll ### Syntax ```csharp [Preserve] [DataContract(Name = "MigrationDataInfo")] public class MigrationDataInfo ``` ### Constructors #### MigrationDataInfo(string write = null, string read = null, DateTime expires = default, int maxSize = 0) ##### Description Initializes a new instance of the MigrationDataInfo class with the specified migration data URLs, expiration time, and maximum size. ##### Declaration ```csharp [Preserve] public MigrationDataInfo(string write = null, string read = null, DateTime expires = default, int maxSize = 0) ``` ##### Parameters - **write** (string) - Optional - The migration data write URL. - **read** (string) - Optional - The migration data read URL. - **expires** (DateTime) - Optional - When the URLs will expire. The timestamp is in UTC and conforms to ISO 8601. - **maxSize** (int) - Optional - The max size of migration data in bytes. ### Properties #### Expires ##### Description When the URLs will expire. The timestamp is in UTC and conforms to ISO 8601. ##### Declaration ```csharp [Preserve] [DataMember(Name = "expires", EmitDefaultValue = false)] public DateTime Expires { get; } ``` ##### Property Value - **DateTime** - The expiration timestamp. #### MaxSize ##### Description The max size of migration data in bytes. ##### Declaration ```csharp [Preserve] [DataMember(Name = "maxSize", EmitDefaultValue = false)] public int MaxSize { get; } ``` ##### Property Value - **int** - The maximum size in bytes. #### Read ##### Description The migration data read URL. ##### Declaration ```csharp [Preserve] [DataMember(Name = "read", EmitDefaultValue = false)] public string Read { get; } ``` ##### Property Value - **string** - The read URL. #### Write ##### Description The migration data write URL. ##### Declaration ```csharp [Preserve] [DataMember(Name = "write", EmitDefaultValue = false)] public string Write { get; } ``` ##### Property Value - **string** - The write URL. ``` -------------------------------- ### Class Detail Source: https://docs.unity3d.com/Packages/com.unity.services.multiplayer%402.3/api/Unity.Services.Lobbies.Models.Detail.html Documentation for the Detail class, including its constructor and properties. ```APIDOC ## Class Detail ### Description Additional detail about an error. This may include detailed validation failure messages, debugging information, troubleshooting steps, or more. ### Inheritance object -> Detail ### Namespace Unity.Services.Lobbies.Models ### Assembly Unity.Services.Multiplayer.dll ### Syntax ```csharp [Preserve] [DataContract(Name = "Detail")] public class Detail ``` ### Constructors #### Detail(string, string) ##### Declaration ```csharp [Preserve] public Detail(string errorType = null, string message = null) ``` ##### Parameters - **errorType** (string) - Optional - errorType param - **message** (string) - Optional - message param ### Properties #### ErrorType ##### Declaration ```csharp [Preserve] [DataMember(Name = "errorType", EmitDefaultValue = false)] public string ErrorType { get; } ``` ##### Property Value - **string** - The error type. #### Message ##### Declaration ```csharp [Preserve] [DataMember(Name = "message", EmitDefaultValue = false)] public string Message { get; } ``` ##### Property Value - **string** - The error message. ``` -------------------------------- ### MultiplayAssignment.Status Property Source: https://docs.unity3d.com/Packages/com.unity.services.multiplayer%402.3/api/Unity.Services.Matchmaker.Models.MultiplayAssignment.html Gets the status of the assignment. ```APIDOC ## MultiplayAssignment.Status Property ### Description Gets the status of the assignment. One of Timeout, Failed, InProgress, Found. ### Declaration ```csharp [Preserve] [JsonConverter(typeof(StringEnumConverter))] [DataMember(Name = "status", EmitDefaultValue = false)] public MultiplayAssignment.StatusOptions Status { get; } ``` ### Property Value - **Type**: MultiplayAssignment.StatusOptions - **Description**: The status of the assignment. One of Timeout, Failed, InProgress, Found. ``` -------------------------------- ### QueryResponse(List results, string continuationToken) Source: https://docs.unity3d.com/Packages/com.unity.services.multiplayer%402.3/api/Unity.Services.Lobbies.Models.QueryResponse.html Constructor for creating a QueryResponse instance. It initializes the response with the provided list of lobbies and a continuation token for pagination. ```APIDOC ## [CONSTRUCTOR] QueryResponse(List results, string continuationToken) ### Description Initializes a new instance of the QueryResponse class with the specified results and continuation token. ### Method Constructor ### Signature [Preserve] public QueryResponse(List results = null, string continuationToken = null) ### Parameters - **results** (List) - Optional - The list of lobbies that matched the query. - **continuationToken** (string) - Optional - The continuation token for pagination. ### Example ```csharp var response = new QueryResponse(results, continuationToken); ``` ``` -------------------------------- ### Reason Source: https://docs.unity3d.com/Packages/com.unity.services.multiplayer%402.3/api/Unity.Services.Matchmaker.MatchmakerServiceException.html Gets the reason for the service failure. ```APIDOC ## Reason ### Description Reason for service failure. ### Declaration ```csharp public MatchmakerExceptionReason Reason { get; } ``` ### Property Value - **MatchmakerExceptionReason** - The reason for the service failure. ``` -------------------------------- ### Uri Source: https://docs.unity3d.com/Packages/com.unity.services.multiplayer%402.3/api/Unity.Services.Lobbies.Models.TokenData.html Gets the URI of the token, if applicable. ```APIDOC ## Uri ### Description Gets the URI of the token, if applicable. ### Declaration ```csharp [Preserve] [DataMember(Name = "uri", EmitDefaultValue = false)] public string Uri { get; } ``` ### Property Value - **string** - The URI of the token, if applicable. ``` -------------------------------- ### JoinAllocation(Guid, List, RelayServer, byte[], byte[], byte[], string, byte[]) Source: https://docs.unity3d.com/Packages/com.unity.services.multiplayer%402.3/api/Unity.Services.Relay.Models.JoinAllocation.html Initializes a new instance of the JoinAllocation class with the provided allocation details. ```APIDOC ## [Constructor] JoinAllocation(Guid allocationId, List serverEndpoints, RelayServer relayServer, byte[] key, byte[] connectionData, byte[] allocationIdBytes, string region, byte[] hostConnectionData) ### Description Creates a new JoinAllocation object representing an allocation created via a join code. ### Declaration ``` [Preserve] public JoinAllocation(Guid allocationId, List serverEndpoints, RelayServer relayServer, byte[] key, byte[] connectionData, byte[] allocationIdBytes, string region, byte[] hostConnectionData) ``` ### Parameters | Type | Name | Description | |---|---|---| | Guid | allocationId | The unique ID of the allocation. | | List | serverEndpoints | Connection endpoints for the assigned Relay server. Note: The order of server endpoints is not guaranteed; iterate over items and look for desired values. | | RelayServer | relayServer | The RelayServer object. | | byte[] | key | A base64-encoded key required for the HMAC signature of the BIND message. | | byte[] | connectionData | A base64-encoded representation of an encrypted connection data blob describing this allocation. Required for establishing communication with other players. | | byte[] | allocationIdBytes | A base64-encoded form of the allocation ID. When decoded, this is the exact expected byte alignment to use when crafting Relay protocol messages that require the allocation ID (e.g., PING, CONNECT, RELAY, CLOSE). | | string | region | The allocation region. | | byte[] | hostConnectionData | A base64-encoded representation of an encrypted connection data blob describing the allocation and Relay server of the player who created the join code. Connecting players can use this data to establish communication with the host player. | ``` -------------------------------- ### PlayerProfile(string name = null) Source: https://docs.unity3d.com/Packages/com.unity.services.multiplayer%402.3/api/Unity.Services.Lobbies.Models.PlayerProfile.html Initializes a new instance of the PlayerProfile class with the specified player name. ```APIDOC ## Constructor: PlayerProfile(string name = null) ### Description Initializes a new instance of the PlayerProfile class with the specified player name. ### Declaration ```csharp [Preserve] public PlayerProfile(string name = null) ``` ### Parameters - **name** (string) - Optional - The player's name. ### Remarks This constructor is used to create a PlayerProfile object with the given player name. ``` -------------------------------- ### PlayerProfile.Name Source: https://docs.unity3d.com/Packages/com.unity.services.multiplayer%402.3/api/Unity.Services.Lobbies.Models.PlayerProfile.html Gets the player's name. ```APIDOC ## Property: PlayerProfile.Name ### Description Gets the player's name. ### Declaration ```csharp [Preserve] [DataMember(Name = "name", EmitDefaultValue = false)] public string Name { get; } ``` ### Property Value - **string** - The player's name. ### Remarks This property is read-only and returns the player's name. ``` -------------------------------- ### JoinByCodeRequest.Password Source: https://docs.unity3d.com/Packages/com.unity.services.multiplayer%402.3/api/Unity.Services.Lobbies.Models.JoinByCodeRequest.html Gets the password for the target lobby. ```APIDOC ## Property: Password ### Description The password to the target lobby. If target lobby HasPassword is true, this password must match or the request is denied. ### Declaration ```csharp [Preserve] [DataMember(Name = "password", EmitDefaultValue = false)] public string Password { get; } ``` ### Property Value - **Type**: string ``` -------------------------------- ### BackfillingConfiguration Class Source: https://docs.unity3d.com/Packages/com.unity.services.multiplayer%402.3/api/Unity.Services.Multiplayer.BackfillingConfiguration.html Documentation for the BackfillingConfiguration class, including its properties and their descriptions. ```APIDOC ## Class BackfillingConfiguration ### Description Allow to configure the backfilling behavior on the session. ### Inheritance object -> BackfillingConfiguration ### Namespace Unity.Services.Multiplayer ### Assembly Unity.Services.Multiplayer.dll ### Syntax ```csharp public class BackfillingConfiguration ``` ### Properties #### AutoStart Define if the backfilling will start automatically when a player is missing. If set to false, it is possible to start backfilling manually using StartBackfilling() on the Session. ```csharp public bool AutoStart { get; } ``` **Property Value** | Type | Description | |------|-------------| | bool | | #### AutomaticallyRemovePlayers Define if players leaving the session are automatically removed from the backfill. If set to false, players leaving the session will stay in the backfill ticket preventing them from joining again. ```csharp public bool AutomaticallyRemovePlayers { get; } ``` **Property Value** | Type | Description | |------|-------------| | bool | | #### BackfillingLoopInterval The time between each backfill approval request. Default value is 1 second. Value is invalid if below 0. ```csharp public int BackfillingLoopInterval { get; } ``` **Property Value** | Type | Description | |------|-------------| | int | | #### Enable Allow the matchmaker to backfill the session if it is not full, not locked, and not private. ```csharp public bool Enable { get; set; } ``` **Property Value** | Type | Description | |------|-------------| | bool | | #### PlayerConnectionTimeout The time in seconds that a player who was added from backfilling has to connect to a session before being automatically removed. Default value is 30 seconds. If value is set to 0, the player will never be removed. ```csharp public int PlayerConnectionTimeout { get; set; } ``` **Property Value** | Type | Description | |------|-------------| | int | | ``` -------------------------------- ### Player(string, string, Dictionary, string, DateTime, DateTime, PlayerProfile) Source: https://docs.unity3d.com/Packages/com.unity.services.multiplayer%402.3/api/Unity.Services.Lobbies.Models.Player.html Constructor for the Player class. Initializes a new instance with optional parameters for player identification, connection info, custom data, allocation ID, join time, last update time, and profile. ```APIDOC ## Player Constructor ### Description Initializes a new instance of the Player class with optional parameters. ### Declaration ```csharp [Preserve] public Player(string id = null, string connectionInfo = null, Dictionary data = null, string allocationId = null, DateTime joined = default, DateTime lastUpdated = default, PlayerProfile profile = null) ``` ### Parameters - **id** (string) - Optional - The unique identifier for the player. If not provided for a create or join request, it will be set to the ID of the caller. - **connectionInfo** (string) - Optional - Connection information for connecting to a relay with this player. - **data** (Dictionary) - Optional - Custom game-specific properties that apply to an individual player (e.g. `role` or `skill`). - **allocationId** (string) - Optional - The `allocationId` from the Relay service which associates this player in this lobby with a persistent connection. When a disconnect notification is received, this value is used to identify the associated player in a lobby to mark them as disconnected. - **joined** (DateTime) - Optional - The time at which the player joined the lobby. - **lastUpdated** (DateTime) - Optional - The last time the metadata for this player was updated. - **profile** (PlayerProfile) - Optional - The player profile. ### Return Value A new Player instance. ``` -------------------------------- ### Player Property Source: https://docs.unity3d.com/Packages/com.unity.services.multiplayer%402.3/api/Unity.Services.Lobbies.LobbyPlayerJoined.html Gets the player that joined. ```APIDOC ## Player Property ### Description Gets the player that joined. ### Declaration public readonly Player Player { get; } ### Property Value - **Player** (Player) - The player that joined. ``` -------------------------------- ### ISession.AvailableSlots Source: https://docs.unity3d.com/Packages/com.unity.services.multiplayer%402.3/api/Unity.Services.Multiplayer.ISession.html Gets the number of available slots in the session. ```APIDOC ## ISession.AvailableSlots ### Description Gets the number of available slots in the session. ### Declaration ```csharp int AvailableSlots { get; } ``` ### Property Value | Type | Description | |------|-------------| | int | | ``` -------------------------------- ### CreateBackfillTicketOptions Methods Source: https://docs.unity3d.com/Packages/com.unity.services.multiplayer%402.3/api/Unity.Services.Matchmaker.CreateBackfillTicketOptions.html Methods for configuring connection details on a CreateBackfillTicketOptions instance. ```APIDOC ## WithCustomConnection(Dictionary) ### Description Configures custom third-party hosting connection details using arbitrary metadata. ### Method WithCustomConnection ### Parameters - **data** (Dictionary) - Optional - Optional metadata to include with the connection details. ### Returns - **CreateBackfillTicketOptions** - The current CreateBackfillTicketOptions instance for chaining. ``` ```APIDOC ## WithIpPortConnection(string, uint, Dictionary) ### Description Configures third-party hosting connection details using an IP address and port. ### Method WithIpPortConnection ### Parameters - **ip** (string) - Required - The IPv4 address of the hosting server. - **port** (uint) - Required - The TCP/UDP port of the hosting server. - **data** (Dictionary) - Optional - Optional metadata to include with the connection details. ### Returns - **CreateBackfillTicketOptions** - The current CreateBackfillTicketOptions instance for chaining. ``` -------------------------------- ### Property: Meta Source: https://docs.unity3d.com/Packages/com.unity.services.multiplayer%402.3/api/Unity.Services.Relay.Models.JoinCodeResponseBody.html Gets the meta parameter of JoinCodeResponseBody. ```APIDOC ## Property: Meta ### Description Parameter meta of JoinCodeResponseBody. ### Declaration ```csharp [Preserve] [DataMember(Name = "meta", IsRequired = true, EmitDefaultValue = true)] public ResponseMeta Meta { get; } ``` ### Property Value - **ResponseMeta** - The meta value. ``` -------------------------------- ### CreateSessionAsync(SessionOptions) Source: https://docs.unity3d.com/Packages/com.unity.services.multiplayer%402.3/api/Unity.Services.Multiplayer.IMultiplayerServerService.html Creates a server session. ```APIDOC ## CreateSessionAsync(SessionOptions) ### Description Creates a server session. ### Method CreateSessionAsync ### Parameters - **sessionOptions** (SessionOptions) - Required - The options for the resulting session ### Returns - **Task** - The created server session ### Exceptions - **ArgumentNullException** - If a parameter is null. - **SessionException** - Provides a specific session error type and error message. ```