Interface IMultiplayerServerService
Facade for session browsing, session management and matchmaking.
Namespace: Unity.Services.Multiplayer
Assembly: solution.dll
Syntax
public interface IMultiplayerServerService
Methods
CreateMatchSessionAsync(string, SessionOptions)
Creates a server session handle with a matchmaker match id. The id must be valid and the matchmaker results will be fetched.
Declaration
Task<IServerSession> CreateMatchSessionAsync(string matchId, SessionOptions sessionOptions)
Parameters
| Type | Name | Description |
|---|---|---|
| string | matchId | The matchmaker match id |
| SessionOptions | sessionOptions | The session options to be used for creation |
Returns
| Type | Description |
|---|---|
| Task<IServerSession> | The server session |
Exceptions
| Type | Condition |
|---|---|
| SessionException | Provides a specific session error type and error message. |
CreateSessionAsync(string, SessionOptions)
Creates a server session handle with a custom session id.
Declaration
Task<IServerSession> CreateSessionAsync(string sessionId, SessionOptions sessionOptions)
Parameters
| Type | Name | Description |
|---|---|---|
| string | sessionId | The session id |
| SessionOptions | sessionOptions | The session options to be used for creation |
Returns
| Type | Description |
|---|---|
| Task<IServerSession> | The server session |
Exceptions
| Type | Condition |
|---|---|
| SessionException | Provides a specific session error type and error message. |
CreateSessionAsync(SessionOptions)
Creates a server session.
Declaration
Task<IServerSession> CreateSessionAsync(SessionOptions sessionOptions)
Parameters
| Type | Name | Description |
|---|---|---|
| SessionOptions | sessionOptions | The options for the resulting session |
Returns
| Type | Description |
|---|---|
| Task<IServerSession> | The created server session |
Exceptions
| Type | Condition |
|---|---|
| SessionException | Provides a specific session error type and error message. |