ドキュメント

​
​

Development

User Acquisition

Monetization

産業

Multiplayer Services SDK

All Services

Multiplayer Services SDK

このページは選択した言語では使用できません。
Multiplayer
​
​
Multiplayer Services SDK
  • Overview
  • Get started
    • Install the SDK
    • Migrate to the Multiplayer SDK
    • Billing
  • Use multiplayer sessions
  • Manage sessions
  • Connect players through a relay
  • Networking
  • Matchmaking
  • Monitor and debug sessions
  • Tutorials
  • Reference
  1. Multiplayer Services SDK

Migrate to the Multiplayer Services SDK

Transfer from the individual services' SDKs to the unified Multiplayer Services SDK.
読み終わるまでの所要時間 2 分
最終更新 20日前

The Multiplayer Services SDK unites the functionality of the standalone SDKs from the following services:
  • Lobby
  • Matchmaker
  • Relay
If you're already using any of the SDKs from these individual services in your project but want to move to the unified Multiplayer Services SDK, you must first migrate from the individual services' packages to the Multiplayer Services package.

Migrate from Lobby

To migrate from the Lobby SDK to the unified Multiplayer Services SDK, do the following:
  1. Remove the Lobby package from the Package Manager.
  2. Install the Multiplayer Services package from the Package Manager.
  3. Change any usage of
    Lobbies.Instance
    to
    LobbyService.Instance
注
If you use assembly definition files (Unity Manual), change any Lobby package reference to the Multiplayer Services package.
You have now migrated the functionality of the Lobby SDK to the Multiplayer Services SDK in your project.

Migrate from Matchmaker

To migrate from the Matchmaker SDK to the unified Multiplayer Services SDK, do the following:
  1. Remove the Matchmaker package from the Package Manager.
  2. Install the Multiplayer Services package from the Package Manager.
注
If you use assembly definition files (Unity Manual), change any Matchmaker package reference to the Multiplayer Services package.
You have now migrated the functionality of the Matchmaker SDK to the Multiplayer Services SDK in your project.

Migrate from Relay

To migrate from the Relay SDK to the unified Multiplayer Services SDK, do the following:
  1. Remove the Relay package from the Package Manager.
  2. Install the Multiplayer Services package from the Package Manager.
  3. Change any usage of
    Relay.Instance
    to
    RelayService.Instance
    .
  4. Change
    RelayServerData(hostAllocation, connectionType)
    constructors into
    AllocationUtils.ToRelayServerData(hostAllocation, connectionType)
    . Refer to the code below for more details.
注
If you use assembly definition files (Unity Manual), change any Relay package reference to the Multiplayer Services package.
If you use Relay with the Unity Transport Protocol (UTP), adapt the creation of the
RelayServerData
using the following sample code:

For the host

// maxConnections is the maximum number of connections the allocation is expecting// connectionType is the host connection type, this can be "dtls", "udp" or "wss"// create allocationvar allocation = await RelayService.Instance.CreateAllocationAsync(maxConnections);var relayServerData = allocation.ToRelayServerData(connectionType);NetworkManager.Singleton.GetComponent<UnityTransport>().SetRelayServerData(relayServerData);

For the joining player

// connectionType is the host connection type, this can be "dtls", "udp" or "wss"// joinCode is the allocation join code shared by the host player after creating the allocation and retrieving the join codevar allocation = await RelayService.Instance.JoinAllocationAsync(joinCode);var relayServerData = allocation.ToRelayServerData(connectionType);NetworkManager.Singleton.GetComponent<UnityTransport>().SetRelayServerData(relayServerData);
Refer to Use Relay with Netcode for GameObjects for more details on using Relay with Netcode for GameObjects with the Multiplayer Services SDK.

Copyright © 2026 Unity Technologies
法規事項プライバシーポリシークッキーDocumentation Terms of Use私の個人情報を販売または共有しないプライバシーに関する選択 (クッキー設定)

"Unity" の名称、Unity のロゴ、およびその他の Unity の商標は、米国およびその他の国における Unity Technologies またはその関係会社の商標または登録商標です (詳しくはこちら)。その他の名称またはブランドは該当する所有者の商標です。

一部のページは利便性向上のため機械翻訳を使用しており、内容に不正確な表現が含まれる場合があります。内容に齟齬または不一致が生じた場合は、英語版を正本とします。

  • このページ
    • Migrate from Lobby

    • Migrate from Matchmaker

    • Migrate from Relay

      • For the host

      • For the joining player


このページの問題を報告する