기술 자료

​
​

Development

User Acquisition

Monetization

산업 분야

Multiplayer Services SDK

All Services

Multiplayer Services SDK

이 페이지는 선택한 언어로 제공되지 않습니다.
Multiplayer
​
​
Multiplayer Services SDK
  • Overview
  • Get started
  • Use multiplayer sessions
    • Integrate Multiplayer sessions
      • Initialize UGS and authenticate the player
      • Create a session
      • Create sessions in the Editor
      • Find and join a session
      • Matchmaking
        • Match make with the Quick Join API
        • Advanced matchmaking
      • Migrate session host
      • Leave a session
      • Get a list of joined sessions
      • Delete a session
      • Session configuration options
    • Game server hosting support
  • Manage sessions
  • Connect players through a relay
  • Networking
  • Matchmaking
  • Monitor and debug sessions
  • Tutorials
  • Reference
  1. Multiplayer Services SDK

Advanced matchmaking

Use additional rules and parameters to matchmake players on multiple variables.
읽는 시간 2분
최근 업데이트: 15일 전

Find a session using Unity Matchmaker service

Use the Unity Matchmaker service to have a player join the best-suited session using more advanced rules.
Matches can be tuned for network quality using Quality of Service (QoS) rules on the pool configuration. This type of rule ensures that players in the match don't exceed a specified latency to the host or server. For a given match, these rules also select the most suitable region in which to allocate a server or relay.
참고
The Multiplayer Services SDK automatically performs QoS measurements, and includes the results with the matchmaking request.
The following example demonstrates how to find and join a session using Matchmaker:
var matchmakerOptions = new MatchmakerOptions{ QueueName = "Friendly"};var sessionOptions = new SessionOptions(){ MaxPlayers = 2}.WithDirectNetwork();var matchmakerCancellationSource = new CancellationTokenSource();ISession session = await MultiplayerService.Instance.MatchmakeSessionAsync(matchmakerOptions, sessionOptions, matchmakerCancellationSource.Token);
For Matchmaker to find a session for the player, the user is expected to configure the matchmaking rules.
참고
To test this code, create a queue named
Friendly
and use the default pool.

Network choice when matchmaking

  • The recommended best practice is to use
    WithDirectNetwork()
    when the Matchmaker pool is configured with your preferred hosting provider.
  • WithDirectNetwork()
    instructs clients to use direct network connections to the allocated server's IP and port.
  • The recommended best practice is to use
    WithRelayNetwork()
    or
    WithDistributedAuthorityNetwork()
    when the Matchmaker pool is configured for client-hosted (peer-to-peer) games.

Cancel matchmaking

If the player wants to stop the matchmaking process, use the following code:
matchmakerCancellationSource.Cancel();
This indicates to the Multiplayer Services SDK to delete the matchmaking ticket that was sent in the background to the service, and stop the search for a session.

Matchmaking results

The session also provides access to the Matchmaking Results with the information about the match and the players that are going to connect to the session (their teams and their data).
Some information, such as team breakdown and custom ticket data, is only available through matchmaking results. The results also include the list of expected players, which is handy as it's available immediately and authoritatively before the players join the session and connect.
You can access the matchmaking results with the following code:
var matchmakingResults = session.GetMatchmakingResults();

Additional resources

  • ISession interface
  • MatchmakerOptions
  • Matchmaker rule samples
  • QuickJoinOptions

Copyright © 2026 Unity Technologies
법률 정보개인정보 처리방침쿠키Documentation Terms of Use개인 정보 판매 또는 공유 금지개인정보 보호 선택(쿠키 설정)

'Unity', Unity 로고 및 기타 Unity 상표는 미국 및 기타 지역 내 Unity Technologies 또는 그 계열사의 상표 또는 등록상표입니다(자세한 내용은 여기에서 확인하세요). 기타 명칭 또는 브랜드는 해당 소유자의 상표입니다.

일부 페이지는 편의를 위해 기계 번역되었으며 부정확한 내용이 있을 수 있습니다. 정보가 상충되는 경우, 영어 버전을 우선으로 참조하세요.

  • 보고 있는 페이지
    • Find a session using Unity Matchmaker service

      • Network choice when matchmaking

      • Cancel matchmaking

      • Matchmaking results

    • Additional resources


이 페이지의 문제 보고