← Back to blog

Game UI Safe Area and Device QA: Debug Order and Prefab Fixes

When the Unity Editor looks fine but notches clip HUD or taps miss: classify failures, debug Canvas Scaler and Screen.safeArea, fix Prefabs vs Studio re-export—with design safe-zone marks as support.

Published
  • game-ui-design
  • game-dev-ai
  • ui-to-engine
  • safe-area
  • unity
  • godot
  • cocos
  • vberai
  • qa
  • 2026
Game UI Safe Area and Device QA: Debug Order and Prefab Fixes

The most common report: Game view looks fine, but on a tall phone the HUD sits under the notch, or buttons look tappable but hits miss. Safe Area is not “nudge the Anchor”—it is root Canvas policy, full-bleed background vs inset content, and whether runtime safeArea matches the channel.

Failure classes, Unity UGUI debug order, Prefab fix rules, and channel/mini-game caveats are covered below. Design handoff item 7 safe-zone marks are summarized under “what design must supply”; pre-ship item 1 device scope is expanded here—not a repeat of engine + MCP checklist Raycast / first Play.

Godot / Cocos: Map to DisplayServer.get_display_safe_area() / engine SafeArea widgets; same step order as Unity below.

Fail criteria (any one = not passed): primary readable UI or required buttons under system occlusion (notch, home indicator, rounded corners); obvious visual vs hit offset; Editor 16:9 only with no target aspect on device; Dev vs Release Safe Area behavior differs without spec.


Classify first: clip, offset, or background only

SymptomSuspect firstDebug step
Visual clip (text/icons in notch)Content not inset; root treated as full screenCheck safeArea vs content rects
Tap offset (looks right, misses)Canvas scale mode, multiple Canvases, camera mismatchEventSystem raycast + Canvas renderMode
Background clipped, buttons OKFull-bleed bg by design, content insetNot a fail if spec allows
Wrong after rotationNo listener for orientation / safeArea changeRecompute inset on rotate
One channel build onlySDK changes safeArea or resolutionSmoke that build; do not rely on generic Android only

Notch clip vs correct safe inset

Visual button vs hit area offset


1. Lock reproduction

Record device, OS, Dev/Release, orientation, Game view resolution. Pre-ship item 5: run main HUD on Dev and Release.

2. Log safeArea and reference resolution

After main UI loads, log:

  • Screen.width / Screen.height
  • Screen.safeArea
  • Display.cutouts (Android 11+ if used)

Read: safeArea smaller than screen → content inset required. In Editor safeArea often equals full screen → not a substitute for device.

3. Canvas root and Canvas Scaler

CheckTypical mistakeFix direction
Root Render ModeMixed Screen Space / Camera UI → ray offsetOne mode for UI
Canvas ScalerReference resolution ≠ project portrait baselineMatch engine checklist item 1
Match width/heightLong aspect scales wrong; edge widgets driftAgree Match with design/prod; fix Prefab not Scene-only
Multiple Canvas sortHits go to wrong layerAlign sortingOrder and raycast targets

4. Layer: full-bleed background vs safe content

Suggested Prefab hierarchy:

Canvas
├── Background_FullBleed   (full anchor, may enter notch, no input)
└── SafeRoot               (Safe Area component or safeArea-driven padding)
    ├── HUD_Content
    └── Popups

Background_FullBleed and SafeRoot hierarchy

Use Unity Safe Area (or project code setting offsetMin/Max from Screen.safeArea). Do not stretch interactive buttons full screen without inset.

Studio exports with one flat layer: see nine-slice / structured re-export and canvas → Prefab.

5. Device tap spot-check

3–5 critical buttons on main flow; compare visual center to finger. Offset only on one popup → check nested Canvas or double Scaler.

6. Commit Prefab in repo

Pass criteria live in versioned Prefab, not test Scene overrides (pre-ship item 6). After Anchor changes, run locale overflow smoke on stress languages.


Channel / mini-game

ScenarioNote
Native appScreen.safeArea + real devices
Some mini-games / quick appsContainer safeArea / systemInfo ≠ Editor sim
Android cutoutscutout vs safeArea may differ
PC / decksafeArea often full screen

Pattern: ISafeAreaProvider (or equivalent); inject per platform—avoid #if in HUD Prefabs.


Fix routing

SymptomLikely causeActionOwner
Device clip, Editor OKNo SafeRoot / no safeArea driverLayer Prefab + Safe Area; retest deviceEngineering
Background OK, buttons clippedButtons under bleed layerMove to SafeRoot; Studio re-export layersEngineering + Design
Tap offsetMulti Canvas / camera UI / nested ScalerMerge Canvas or unify raycast cameraEngineering
Drift on resolution changeFixed anchors onlyFix anchors; engine item 6Engineering
Design has no safe frameMissing handoff item 7Design adds notch/home refs; re-exportDesign
Flat Studio exportBG + HUD not splitIn-place split then re-exportEngineering + Design

What design supplies

DeliveryUse in Prefab
Target resolution + safe reference (notch / home bar)Reference Resolution and inset expectations
Named full-bleed vs HUD layersPrefab Background_* / SafeRoot
Edge tabs inside safe or intentional bleedAnchor strategy

Designers need not write scripts—clear marks reduce guessed inset px.


FAQ

Is Game view iPhone resolution enough?
Dev smoke only; ship requires target devices (pre-ship item 1). Editor safeArea often differs.

Safe Area component vs manual offset?
Team choice; manual must refresh on safeArea/orientation changes—avoid duplicate logic.

Fix clip by Canvas Scaler alone?
Scaler scales; inset is separate. Clip is content rect; Scaler is global scale.

Can MCP/Cursor help?
Good for Prefab renames, attaching Safe Area, Play smoke—numbers still from device logs. Engine + MCP checklist.

Safe Area plus locale overflow?
Fix SafeRoot layout first, then stress locales—inset shrinks width.

VberAI Studio vs Google AI Studio?
No. See comparison.

More guides you might like