Localize without refactoring: a runtime translation layer swaps your existing TMP/uGUI strings. No keys, no rewrites. CSV workflow for translators, regex for dynamic text, full C# source.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 Start"), 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 limitsWHAT IT IS NOTA full asset-localization suite (localized sprites, audio, plural rules). It does one thing fast: getting your existing string UI translated with minimum effort.FAQTextMeshPro 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.- 4 assemblies (Runtime core has zero UI dependencies), full C# source, ~800 LOC- Runtime: exact / affix-tolerant / rich-text / regex matching, PlayerPrefs persistence, OS-language auto-detect, LanguageChanged event, CSV loader- Scanner: TMP_Text + UI.Text, interval sweep, input-field auto-skip, LocIgnore marker, Fast-Enter-Play-Mode safe, lazy bootstrap (zero overhead until a language is registered)- Editor: demo installer, scene-text to CSV template exporter (UTF-8 BOM, Excel-safe)- Demo: runtime-built UI, EN to DE / ES / FR, works with both input backendsAI/ML (large language models) was used as a coding and writing assistant throughout development: generating and refactoring the C# source, writing tests, and drafting the documentation and store text. The concept, architecture, code review, and all final decisions are human (Daniel Schnurbusch). The package contains only original C# source and text — no AI-generated art, audio, or third-party assets are included.





