Unity
Quick Start

Quick Start

Integrate real-time chat in your Unity client apps with speed and efficiency. Our Unity SDK helps you to focus on the client side implementation of initializing, configuring and building the chat. On the server side, SendBird ensures reliable infra management services with the SDK. This quick start shows a brief overview of the SDK’s structure and features, then goes through the preliminary steps of implementing the SDK in your own project.


Step 1: Create a SendBird application from your dashboard

First, create your SendBird application which comprises everything required in a chat service such as users, messages, and channels.

  1. In the SendBird Dashboard, type your email and password to create a new account. You can also sign in with or sign up for a Google or GitHub account.
  2. When prompted by the setup wizard, enter your organization information to manage SendBird applications.
  3. Lastly, when your dashboard home appears after completing setup, click Create App at the top-right corner for a new application. You can also create via the Platform API.

You can integrate only one SendBird application per app for your service, regardless of the platforms. All users within your SendBird application can communicate with each other, across all platforms. This means that your users using iOS, Android, web, .NET, and Unity client apps, can all chat with one another without any further setup. Note that all data are limited to the scope of a single application, and users in different SendBird applications can't talk to each other.


Step 2: Check requirements

The Unity SDK is designed and tested on Mono/.NET 2.0 platform and Unity 5.x.x or higher.


Step 3: Download the latest .NET SDK

Download Latest SDK

WebSocket Library

The Unity SDK uses websocket-sharp for websocket connection. You must include the websocket-sharp.dll as well as the SendBird.dll or SendBird.Unity.dll. You can find websocket-sharp.dll on the same github repository for the .NET SDK.


Step 4: Download the sample UI

Download Sample UI


Step 5: Unity dispatcher

The Unity SDK uses dispatcher pattern to avoid multi-threading issue. This dispatcher must be initialized along with SendBirdClient.Init.

Light Color Skin
Copy
void Awake() {
    SendBirdClient.SetupUnityDispatcher (gameObject); // Set SendBird gameobject to DontDestroyOnLoad.
    StartCoroutine (SendBirdClient.StartUnityDispatcher); // Start a Unity dispatcher.

    SendBirdClient.Init ("A7A2672C-AD11-11E4-8DAA-0A18B21C2D82"); // SendBird Sample Application ID
    ...
}