01 · User Profile & Identity Retrieval
Used to extract and display the player's authentic Telegram nickname, numeric ID, language, and Premium membership status on the UI.
Implementation Tracks
Track A — Prefab Workflow
- Open the
01_UserInfo_Demoscene. - Locate
FastTMA_UserInfoWidgetinPackages/com.fasttma.core/Runtime/Prefabs/and drag it directly under theCanvasnode. - Click Play. The interface will automatically display the formatted player's full name and username.
Editor Behavior
Inside the Unity Editor, the widget automatically falls back to Mock debug data for preview purposes.
Track B — Non-Invasive Component Attachment
- Select any node in your existing project that contains a
TextorTextMeshPro - Text (UI)component. - Click Add Component →
TelegramUserInfoText. - Configure the Format template in the Inspector panel:
| Token | Description |
|---|---|
{firstName} | First name |
{username} | Username (with @) |
{id} | Numeric UID |
{isPremium} | Premium membership status |
Example format string:
Player: {firstName} (@{username}) | ID: {id}Demo Reference
See Packages/com.fasttma.core/Samples/01_UserInfo for the full Demo implementation.