Table of Contents

Class WynLobby

Namespace
Wyn.Lobby
Assembly
Wyn.Lobby.Runtime.dll

Main entry point for WynLobby — a simplified wrapper around Unity MPS Session API. Attach to a persistent GameObject in your scene.

public class WynLobby : MonoBehaviour
Inheritance
Object
Component
Behaviour
MonoBehaviour
WynLobby
Inherited Members
MonoBehaviour.IsInvoking()
MonoBehaviour.CancelInvoke()
MonoBehaviour.StopCoroutine(Coroutine)
MonoBehaviour.StopAllCoroutines()
MonoBehaviour.destroyCancellationToken
MonoBehaviour.useGUILayout
MonoBehaviour.didStart
MonoBehaviour.didAwake
MonoBehaviour.runInEditMode
Behaviour.enabled
Behaviour.isActiveAndEnabled
Component.GetComponent<T>()
Component.TryGetComponent<T>(out T)
Component.GetComponentInChildren<T>()
Component.GetComponentsInChildren<T>()
Component.GetComponentInParent<T>()
Component.GetComponentsInParent<T>()
Component.GetComponents<T>()
Component.GetComponentIndex()
Component.CompareTag(TagHandle)
Component.transform
Component.transformHandle
Component.gameObject
Component.tag
Object.GetEntityId()
Object.GetInstanceID()
Object.GetHashCode()
Object.InstantiateAsync<T>(T)
Object.InstantiateAsync<T>(T, Transform)
Object.InstantiateAsync<T>(T, Vector3, Quaternion)
Object.InstantiateAsync<T>(T, Transform, Vector3, Quaternion)
Object.Instantiate(Object, Vector3, Quaternion)
Object.Instantiate(Object, Vector3, Quaternion, Transform)
Object.Instantiate(Object)
Object.Instantiate(Object, Scene)
Object.Instantiate<T>(T, InstantiateParameters)
Object.Instantiate<T>(T, Vector3, Quaternion, InstantiateParameters)
Object.Instantiate(Object, Transform)
Object.Instantiate<T>(T)
Object.Instantiate<T>(T, Vector3, Quaternion)
Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
Object.Instantiate<T>(T, Transform)
Object.Destroy(Object)
Object.DestroyImmediate(Object)
Object.DontDestroyOnLoad(Object)
Object.DestroyObject(Object)
Object.FindObjectsOfType<T>()
Object.FindObjectsByType<T>(FindObjectsSortMode)
Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
Object.FindObjectOfType<T>()
Object.FindFirstObjectByType<T>()
Object.FindAnyObjectByType<T>()
Object.FindFirstObjectByType<T>(FindObjectsInactive)
Object.FindAnyObjectByType<T>(FindObjectsInactive)
Object.ToString()
Object.name
Object.hideFlags

Properties

Config

The lobby config asset used by this instance.

public WynLobbyConfig Config { get; }

Property Value

WynLobbyConfig

CurrentSession

Current active session, or null if not in a session.

public ISession CurrentSession { get; }

Property Value

ISession

IsHost

Whether the local player is the host of the current session.

public bool IsHost { get; }

Property Value

bool

IsInSession

Whether the local player is currently in a session.

public bool IsInSession { get; }

Property Value

bool

SessionCode

The join code for the current session, or null.

public string SessionCode { get; }

Property Value

string

Methods

CreateSessionAsync(string)

Create a new session as host. Internally handles Relay allocation, Lobby creation, and network startup.

public Task<ISession> CreateSessionAsync(string sessionName = null)

Parameters

sessionName string

Returns

Task<ISession>

InitializeAsync()

Initialize Unity Gaming Services and sign in anonymously. Must be called before any session operations.

public Task<bool> InitializeAsync()

Returns

Task<bool>

JoinSessionByCodeAsync(string)

Join an existing session by its join code.

public Task<ISession> JoinSessionByCodeAsync(string code)

Parameters

code string

Returns

Task<ISession>

JoinSessionByIdAsync(string)

Join an existing session by its session ID (from query results).

public Task<ISession> JoinSessionByIdAsync(string sessionId)

Parameters

sessionId string

Returns

Task<ISession>

LeaveSessionAsync()

Leave the current session.

public Task LeaveSessionAsync()

Returns

Task

QuerySessionsAsync()

Query discoverable sessions. By default, only sessions with available slots are returned.

public Task<QuerySessionsResults> QuerySessionsAsync()

Returns

Task<QuerySessionsResults>

TryRequestGameStart(string, out string)

Validate and request gameplay start. Runtime only emits an intent event; scene transition is handled by game layer.

public bool TryRequestGameStart(string sceneName, out string reason)

Parameters

sceneName string
reason string

Returns

bool