Apps SDK — Unity

Translate your Unity game's uGUI / TextMeshPro UI into 90 languages with one Init call. The package caches translations on disk for instant offline startup and never throws into your game code — every failure falls back to the original text.

Experimental preview. This is an early UPM package (com.transable.sdk 0.1.0-preview.1). The Runtime/*.cs glue compiles clean against Unity's assemblies, but it has not yet been run inside a licensed Unity Editor, and the public API may change between preview releases. Not recommended for a shipping title yet — we'd love your feedback.

Install

  1. Download the package: transable-unity-0.1.0-preview.1.zip
  2. Unzip it outside your Assets/ folder, then in Unity open Window → Package Manager → + → Add package from disk… and select the unzipped package.json. (Or unzip it into Packages/com.transable.sdk/ as an embedded package.)
  3. Requires Unity 2021.3 LTS or newer and the built-in uGUI. The precompiled Transable.Sdk.dll and its dependencies are bundled under Runtime/Plugins/ — no dotnet build step needed. TextMeshPro support turns on automatically when TMP is present.
  4. Create an app project in the dashboard and copy your API key.

One-line start

Add a bootstrap MonoBehaviour to a GameObject in your first scene. Init creates the hidden, scene-surviving driver for you — you do not add a driver component by hand. It must be called once, from the main thread, and never throws:

using Transable.Sdk;
using Transable.Sdk.Unity;
using UnityEngine;

public class TransableBootstrap : MonoBehaviour
{
    private void Awake()
    {
        TransableUnity.Init("tk_live_yourKeyHere");
        // Optional: force a language — otherwise the OS locale is used and the
        // player's previous choice is remembered across launches:
        // TransableUnity.SetLanguage("de");
    }
}

That's it. In the default Magic mode the driver sweeps loaded scenes every ~2 seconds and translates active UnityEngine.UI.Text (and TMP_Text when TMP is present) in place. Want manual strings or an index-aligned batch instead?

myText.text = TransableUnity.T("greeting", "Welcome back");   // cached → translated
var outp = await TransableUnity.TranslateBatchAsync(new[]{ "Save", "Cancel" }, "de");

Switching language & ignoring subtrees

Switch language live at runtime; switching back to the source language restores the originals:

TransableUnity.SetLanguage("fr");

To exempt a subtree from Magic, add the TransableIgnore component (Add Component → Transable → Transable Ignore) to any GameObject — it and all its descendants stay in the source language. Use it on data-driven containers (dropdown option lists, score/timer labels, chat logs) so live data isn't sent for translation.

Safe mode & offline cache

Safe mode is on by default and runs inside the core before any network call: emails, URLs, file paths, GUIDs, version numbers, log lines, pure numbers, and code-like identifiers (PascalCaseNames) are never sent — while single words like "Save" or "Play" translate normally. User input is never touched: any text under an InputField / TMP_InputField (including its placeholder) is never read, cached, or sent.

Every translation is cached on disk under {Application.persistentDataPath}/Transable/cache/v1/, per language, content-addressed (change one string, only that string is retranslated). The second launch is translated instantly — even fully offline.

It never crashes your game

One rule: nothing here throws into game code. Missing key, no network, HTTP 4xx/5xx, quota exhausted — the UI stays in the source language and translation retries quietly, with at most a Unity-console warning. Rate limits (429) honor Retry-After; an invalid key disables translation for the session.

Questions or something broke? Contact us — include your Unity version and the package version. Other platforms: Godot, Unreal Engine, or any language via the REST API. Full platform list on Apps SDK.