05 · Dynamic Island & Fullscreen Safe Area Adaptation
Prevents UI clipping caused by the iPhone Dynamic Island, camera notches, bottom Home Bar, and the Telegram native top header bar.
Implementation Tracks
Track A — Prefab Workflow
- Open the
05_SafeArea_Demoscene. - Drag
FastTMA_SafeAreaContainerfromPackages/com.fasttma.core/Runtime/Prefabs/into the root ofCanvas. - Place all in-game UI interfaces that need obstruction prevention inside this container:
- Action buttons
- Top score bars
- Popups and dialogs
The container comes pre-configured with TelegramSafeArea, which automatically contracts margins at runtime based on hardware insets.
Track B — Non-Invasive Component Attachment
- Select the top-level fullscreen UI root panel in your commercial project (e.g.,
UIRootPanel). - Click Add Component →
TelegramSafeArea. - Keep "Enable Top Safe Area" and "Enable Bottom Safe Area" checked in the Inspector.
Technical Details: The component dynamically updates RectTransform margins in LateUpdate with zero GC allocations, seamlessly adapting to:
- Screen orientation changes
- Dynamic Island insets
- Telegram client header height variations
Demo Reference
See Packages/com.fasttma.core/Samples/05_SafeArea for the full Demo implementation.