You want your game in three languages by Friday — not a localization framework migration. LocLayer is a translation layer: your code keeps setting UI strings exactly as it does today, and LocLayer swaps them on screen at runtime.
No keys. No T("...") wrappers. No prefab surgery. No rewrite.
Register a language and add translations (in code, or from a CSV your translator fills in Excel) — the bundled scanner finds every TextMeshPro and uGUI text and translates it live. Anything you haven't translated yet simply stays in your source language, so you can localize incrementally and ship anytime.
Extracted from a shipped game (Famechaser), where this exact system localized ~1,000 strings without touching a single call site.
WHAT YOU GET
- Full C# source (4 small assemblies, no DLLs, no dependencies beyond uGUI/TMP)
- Auto-scanner for TMP_Text + legacy Text: translates, tracks changes, restores originals on switch-back; input-field text is skipped automatically, LocIgnore component for manual exclusions
- 4-stage matching: exact, affix-tolerant ("» Quest complete."), rich-text segmentation ("Press <b>Start</b>"), and regex patterns for dynamic strings ("Score: 812 points"), incl. MatchEvaluator hooks
- CSV import for translators: Excel-friendly (comma/semicolon/tab auto-detect, quotes, line breaks), regex rows, comment rows — plus an editor tool that exports all scene texts as a ready-to-fill template
- Any number of languages, any codes; PlayerPrefs persistence; OS-language auto-detect on first launch; language-changed event
- Interactive demo (English to German/Spanish/French, one click per language)
- PDF/Markdown manual, honest about limits
WHAT IT IS NOT
A full asset-localization suite (localized sprites, audio, plural rules). It does one thing fast: getting your existing string UI translated with minimum effort.
FAQ
TextMeshPro supported? Yes — TMP and legacy uGUI Text, both automatic.
UI Toolkit? The scanner targets TMP/uGUI; for UI Toolkit call Loc.Translate where you set label text (same tables, same CSV).
Performance? Interval-based sweep (default 0.15 s), no per-frame cost, no allocations for unchanged text. Shipped in a WebGL/Android game.
Requirements: Unity 6+ (works with both input backends; TMP ships with Unity 6's uGUI package). Pure C#, works on all platforms including WebGL and mobile.