Unity Global Hub Configuration (FastTMASettings)
Central configuration hub for the FastTMA Suite, accessible via Tools → FastTMA → Settings or Edit → Project Settings → FastTMA. All fields are persisted into a single ScriptableObject asset under ProjectSettings/FastTMASettings.asset.
Access Path
| Method | Path |
|---|---|
| Unity Menu | Tools → FastTMA → Settings |
| Project Settings Window | Edit → Project Settings → FastTMA |

Core Field Specifications
Telegram Pay Url
- Scope: Stars payment relay entry point. When a player initiates a Stars purchase, the runtime reads this URL and opens it in the Telegram WebView via
Telegram.WebApp.openTelegramLink(). - Validation rules:
- Must start with
https://—http://and plain hostnames are rejected. - Must NOT end with a trailing slash
/. A trailing slash causes the Telegram SDK to double-encode the path segment and produce a404at the payment gateway.
- Must start with
- Behaviour: If your game does not use Stars virtual currency purchases, this field may be left empty. It has zero impact on any other module (User Info, Haptics, Cloud Save, etc.).
WARNING
Leaving this field blank while a payment flow is accidentally triggered will silently fall through — no exception is thrown, but the payment intent is discarded. Always verify this field when adding a Stars purchase feature.
Enable Eruda Console
Scope: Mobile on-device floating debug panel providing Console, Network, and Elements tabs, powered by the Eruda library injected at build-time.
Behaviour: When this checkbox is ticked, the post-build processor injects the Eruda snippet into
index.html. The debug gear appears automatically on real-device test runs.Release hygiene requirements:
Stage Enable Eruda Console Action Real-device debugging ✅ Checked Gear visible; full console output Internal QA / TestFlight ❌ Unchecked Gear hidden; no Eruda residual Official store release ❌ Unchecked Clean build; zero Eruda traces The post-build step performs a strict regex sweep on
index.htmlat the asset-generation stage. Unchecking the box guarantees removal — no manual file edits required.
Auto Optimize Compression
Scope: Pre-build self-healing phase that runs immediately before the WebGL IL2CPP compilation pipeline starts.
Core value: Defaults to Checked. Performs the following two actions automatically:
WebGL Compression → Disabled
Disables gzip / Brotli compression at the Unity Player Settings level. This prevents Unity from emittingBuild.framework.js.bror.gzfiles that static hosting (e.g., Cloudflare Pages, Vercel, GitHub Pages) may not serve with the correctContent-Encoding: brheader, causing the browser to receive compressed bytes while believing they are plain text — resulting in a white-screen or black-screen deadlock on first load.Data Caching → Enabled
ActivatesApplication.SetConsoleFlag("webgl_defer_compilation")equivalent behaviour, instructing the browser to cache the WebGL framework until the full binary is ready before attempting to execute it.
When to uncheck: Only when you are using your own server-side Brotli pipeline (e.g., Nginx with
brotli_types, or a CDN with transparentAccept-Encoding: brpassthrough) and are certain your hosting layer setsContent-Encoding: brcorrectly for every asset.
Asset Self-Healing & Connectivity Verification
Create / Rebuild Settings Asset
This button guarantees the existence of the ProjectSettings/FastTMASettings.asset ScriptableObject. Click it when:
- The asset is accidentally deleted from the project.
- A fresh clone of the repository is opened on a new machine.
- The Inspector shows
No FastTMASettings found in ProjectSettings/.
Clicking Create writes a new asset with all fields at their default values. Clicking Rebuild overwrites the existing asset with the values currently shown in the Inspector, serving as a manual reset.
Apply Button — 2-Second Hard-Timeout Pre-Check
When Apply is clicked, the settings pipeline executes the following sequence before committing values to the ScriptableObject:
- Timeout gate: A 2-second hard timer starts immediately.
- HTTP probe: The pipeline issues a HEAD request to the current
Telegram Pay Url(if non-empty). - Outcome matrix:
| Probe result | Timeout hit | Asset Status indicator | Commit behaviour |
|---|---|---|---|
2xx OK | No | 🟢 Valid | Commits immediately |
3xx / 4xx / 5xx | No | 🟡 Reachable but unexpected status | Commits with console warning |
| Network error / DNS fail | No | 🔴 Unreachable | Commits with error entry in Assets/FastTMA/Editor/SettingsReport.txt |
| Timer expires before response | Yes | ⚠️ Timeout | Aborts commit; shows "Network unreachable — check firewall / proxy" dialog |
The 2-second timeout is intentionally aggressive to prevent the Apply button from hanging indefinitely on mobile hotspot connections during a build farm run.
Asset Status State Machine
[No Asset] --Create--> [Default] --Apply--> [Pending Probe]
|
┌─────────────────┼─────────────────┐
▼ ▼ ▼
[Valid] [Reachable / Warn] [Unreachable]
│ │ │
└────────[Asset Saved]←─────────────┘
│
[Ready]| State | Description |
|---|---|
| No Asset | Asset file missing; Inspector shows "Not found" banner. |
| Default | Asset exists; all fields at default. Apply has never been clicked. |
| Pending Probe | Apply clicked; 2-second probe in flight. |
| Valid | Probe returned 2xx; settings committed. |
| Reachable / Warn | Probe returned non-2xx; committed with warning. |
| Unreachable | Probe failed; not committed; error logged. |
| Ready | Asset on disk matches last committed state. |
Pro Tip
Combine Auto Optimize Compression (enabled) with Build → Data Caching in your Cloudflare Pages Pages → Settings → Build configuration to achieve the lowest possible WebGL initial-load time for Telegram Mini App audiences on 4G.