Official package · Game engines

Realtime Unity multiplayer, WebGL builds included

A plain C# client for Unity 2021.3 and later, in the Editor, on desktop, Android, iOS and WebGL. Events arrive on the main thread, and HibiraRoom adds rooms with seats, a host and chat.

  • WebGL builds use the browser’s WebSocket through a small .jslib.
  • Handlers run on Unity’s main thread, so they can touch GameObjects.
  • Rooms speak the same events as the Lobby package and the Godot addon, so players on all three can share a room.

Sign in to see these snippets with your own cluster host. Sign in

  1. Install

    Window → Package Manager → + → Add package from git URL…
    https://github.com/hibira-io/unity.git
  2. Use it

    using Hibira;
    
    var hibira = new HibiraClient(new HibiraOptions
    {
        AppKey = "YOUR_APP_KEY",
        Host = "ws.hibira.io",
    });
    hibira.Connect();
    hibira.Subscribe("scores").Bind("updated", e => Debug.Log(e.DataJson));

Before you start

  • Turn on Allow client events in the app’s settings, so players can send each other moves and taps.
  • Private and presence channels need an auth endpoint on your backend that signs subscriptions with the app secret, as with pusher-js.

Use the app key from your dashboard; the secret stays on your server. Channels, events and authorization endpoints work exactly as they do with Pusher. Create your free account →