LogoRobo.js
TemplatesDiscord activities

Unity

A Discord Activity template for Unity games.

Unity

Build Discord Activities with the Unity game engine. This template provides the integration layer between Unity WebGL builds and Discord's Embedded App SDK.

Getting Started

Create a project with this template:

npx create-robo@next <project-name> --template discord-activities/unity

Then navigate into your project directory:

cd <project-name>

Run development mode:

npm run dev

Unity Setup

  1. Create your Unity project separately
  2. Configure it for WebGL build target
  3. Build and copy the output to /public/unity
  4. The Robo.js wrapper handles Discord SDK integration
.env

Discord SDK Integration

The template includes JavaScript bridge code that:

  • Initializes the Discord SDK
  • Handles authentication
  • Passes user/guild data to Unity
  • Manages activity lifecycle events

Hosting

npm run deploy

Learn More

On this page