← Back to RCADIA

RCADIA Unity SDK Documentation

Complete guide to integrating your Unity games with the RCADIA platform

Quick Start Guide

Get your Unity game connected to RCADIA in under 5 minutes.


Step 1: Install the SDK

Download the SDK files from GitHub:

Copy these two files into your Unity project:

FileLocation
RCADIA.csAssets/ (anywhere in your scripts folder)
RCADIABridge.jslibAssets/Plugins/WebGL/

Note: Create the Plugins/WebGL folder if it doesn't exist. The .jslib file is required for WebGL builds to communicate with the RCADIA platform.


Step 2: Get Your Game Title

Your game ID is the exact title you set when uploading your game to RCADIA.

For example, if you named your game "Super Jump Adventure", use that exact string (case-sensitive).

Tip: You can use any string during development. Just update it to your real game title after uploading to RCADIA.


Step 3: Integrate the SDK

Add the SDK calls to your game code:

using UnityEngine;

public class GameManager : MonoBehaviour
{
    void Start()
    {
        // Initialize SDK with your exact game title from RCADIA
        RCADIA.Initialize("Your Game Title");
    }

    public void OnPlayerDeath()
    {
        // Call when player dies (consumes a tournament life)
        RCADIA.ConsumeLive();

        // Your existing death logic here
        RestartLevel();
    }

    public void OnGameEnd(int finalScore)
    {
        // Submit score when game ends
        RCADIA.SubmitScore(finalScore);

        // Your existing game over logic here
        ShowGameOverScreen();
    }
}

That's the entire integration. The SDK handles all communication with the RCADIA platform.


API Reference

The SDK is a single static class with three methods:

MethodDescription
RCADIA.Initialize(string gameTitle)Initialize the SDK. Call once in Start(). Use your exact game title from RCADIA upload.
RCADIA.ConsumeLive()Notify platform when player dies. Call in your death/respawn logic.
RCADIA.SubmitScore(int score)Submit player's score. Call when game ends. Must be positive.

Method Details

Initialize

RCADIA.Initialize("Super Jump Adventure");
  • Call once at game start (in Start() or Awake())
  • Use your exact game title from RCADIA (case-sensitive)
  • Safe to call multiple times (subsequent calls are ignored)

ConsumeLive

RCADIA.ConsumeLive();
  • Call when player dies or loses a life
  • In tournament mode, this deducts from the player's tournament lives
  • In free play, this call is still made but doesn't affect anything

SubmitScore

RCADIA.SubmitScore(1500);
  • Submit the player's final score
  • Score must be a positive integer (negative scores are rejected)
  • Call when the game session ends

Testing

In Unity Editor

The SDK works in the Unity Editor for development:

  • Initialize() logs a success message
  • ConsumeLive() and SubmitScore() log the actions
  • No actual platform communication occurs

In WebGL Build

When built for WebGL and running on RCADIA:

  • SDK communicates with the platform via JavaScript bridge
  • Scores appear on the tournament leaderboard
  • Lives are tracked for tournament mode

FAQ

Q: Does the SDK require a namespace import?

No. The SDK is a single static class without a namespace. Just call RCADIA.Initialize() directly.

Q: Can I change my game title later?

Contact RCADIA support - title changes require database updates since it's used as the game identifier.

Q: What if the SDK isn't initialized?

ConsumeLive() and SubmitScore() will log a warning and return early if called before Initialize().

Q: Does this work with non-WebGL builds?

The SDK only communicates with the platform in WebGL builds. In other build targets, the methods are called but don't send data anywhere.


Support

Need help? Reach out: