기술 자료

​
​

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
      • 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

Create sessions in the Editor

Create a session in the Unity Editor using ScriptableObjects.
읽는 시간 2분
최근 업데이트: 한 달 전

You can create and manage sessions using ScriptableObjects in the Unity Editor. There are two ScriptableObjects related to multiplayer sessions:
  • MultiplayerSession
    : Stores sessions and makes lifecycles events available within the Editor.
  • SessionConnector
    : Populates the
    MultiplayerSession
    ScriptableObject using the existing operations such as Create and Join.
참고
This functionality is available in the Multiplayer Services package version 2.2.0 and newer.

Use sessions ScriptableObjects

Follow these steps to use ScriptableObjects in your multiplayer project:
  1. Add a
    MultiplayerSession
    and
    SessionConnector
    ScriptableObject
    .
  2. Connect the
    MutliplayerSession
    ScriptableObject
    to the
    SessionConnector
    ScriptableObject.
  3. Configure the ScriptableObjects to match the needs of your project.
  4. (Optional) Configure
    SessionConnectorBehavior
    component

Add ScriptableObjects to your scene

To add multiplayer ScriptableObjects to your project, open the Project window and right-click in the folder your want to create the assets in. Then navigate to Create > Services > Multiplayer. Select Multiplayer Session and then repeat the process and select Session Connector along with your preferred connection type to create both.

Connect the ScriptableObjects

A
SessionConnector
ScriptableObject requires a 'MultiplayerSession' ScriptableObject to work.
Add a
MultiplayerSession
ScriptableObject to a 'SessionConnector' ScriptableObject in the Multiplayer Session field of the
SessionConnector
ScriptableObject in the Inspector window.

Configure 'SessionConnector' ScriptableObject

SessionConnector
supports the following connection types:
  • Create
  • CreateOrJoin
  • Join
From the Inspector window, you can also configure the following settings:
  • The maximum number of players (default is four).
  • The session name.
  • If the session is password protected, private, or locked.
  • Network options such as IP, port, listen IP.
  • Network type: direct, Relay, or none.
  • Session operation events.
  • Session lifecycle events.

CreateOrJoin

The
CreateOrJoin
connection type creates a session when the first user triggers the operation and adds the user to the session. When additional users arrive, they're added to already created session.
This setting is recommended during experimentation and testing because all users are added to the same session.

Create

The
Create
connection type creates a new session with a unique ID.
참고
The
SessionConnector
ScriptableObject retains its settings configuration when exiting Play mode.

Join

The
Join
connection type connects players to a specific session by using a session code or a session ID.

Configure SessionConnectorBehavior

You can optionally use a
SessionConnectorBehaviour
MonoBehaviour to manage session creation and sign-in in the Inspector window instead of in code. Assign a
SessionConnector
ScriptableObject. The MonoBehaviour determines whether to run the
SessionConnector
on sign in or only programatically. The
SessionConnector
determines the connection type (
Create
,
Join
, or
CreateOrJoin
) while
MultiplayerSession
subscribes to all
ISession
events.
The optional setting Execute On Sign In controls timing. When enabled, the behavior subscribes to
AuthenticationService.SignedIn
during
OnServicesInitialized()
so the session operation fires automatically the moment the player authenticates. When disabled, you have to call
Execute()
manually, for example from a Join Game button.

Additional settings

You can enable verbose logging within the Project Settings window. Navigate to Project settings > Services > Multiplayer then select the box for Verbose Logging.

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

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

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

  • 보고 있는 페이지
    • Use sessions ScriptableObjects

      • Add ScriptableObjects to your scene

      • Connect the ScriptableObjects

      • Configure 'SessionConnector' ScriptableObject

        • CreateOrJoin

        • Create

        • Join

      • Configure SessionConnectorBehavior

      • Additional settings


이 페이지의 문제 보고