Match make with the Quick Join API
Quickly match make players using Lobby's Quick Join.
Read time 1 minuteLast updated 4 hours ago
Use the Lobby service to have a player randomly join any session that's compatible with the parameters and filters passed to the
MatchmakeSessionAsyncThis code tries to join a session that has at leastvar quickJoinOptions = new QuickJoinOptions(){ Filters = new List<FilterOption> { new(FilterField.AvailableSlots, "1", FilterOperation.GreaterOrEqual), new (FilterField.StringIndex1, "map 1", FilterOperation.Equal) }, Timeout = TimeSpan.FromSeconds(5), CreateSession = true};var sessionOptions = new SessionOptions(){ MaxPlayers = 2, Type = "Session",}.WithRelayNetwork();ISession session = await MultiplayerService.Instance.MatchmakeSessionAsync(quickJoinOptions, sessionOptions);
1map 1MatchmakeSessionAsync5 secondsCreateSession