Skip to main content
Version: 2026.7
Still in testing

The SDK of this version is still being tested, and these pages are being updated with it: names, menus and procedures may still change before the release. If you build content for a platform already in production, follow the documentation of that version — pick it from the version menu at the top right.

Safe frame and reserved screen zones

On a screen, the application draws its own interface over the scene: the top bar, the bottom bar, the task panel, and on mobile the joystick and the jump button. A panel of your environment drawn over the screen must keep out of those areas, and out of the notch and the rounded corners of a phone. The Safe Frame component does it: it insets one element of a UI Toolkit panel to what is left.

The SDK's screen panels, the HUD and the Notification Host, carry one. Add it to a UI Document of your own to do the same.

Using Safe Frame​

  1. Add Safe Frame (Add Component > Virtuademy > UI > Safe Frame) to the object with the UI Document. The document must be a screen panel (the VirtuademyScreenPanelSettings of Theme).
  2. In the UXML, give the element that holds your content the class vd-safe-frame, or write its name in Target Element Name.
  3. Lay your content out inside that element. It is placed with inline left, right, top and bottom, so it never sits under the application's UI.
FieldWhat it does
Target Element NameThe element to inset. Empty: the first element with the class vd-safe-frame
AreaContent: clear of every zone, with the same inset on both sides so the frame stays centred (on mobile, a column between the joystick and the jump button). For what is in the middle of the view: toasts, dialogs. Edges: up to the side edges, clear of the bars and of the corner controls. For a panel at an edge, like the HUD
Task HudAuto: also keep clear of the task panel on desktop and WebGL when the scene has a Task UI Placeholder. Always, Never
MarginExtra space inside the frame, on every side, in reference pixels: 16

The insets are the larger of the application's zones and the device's safe area, recomputed when the screen is resized or turned and when the zones change. Nothing runs per frame.

Safe Frame does nothing in VR and on world-space panels: they have no screen edge. In VR an overlay is placed in front of the player by Overlay Panel Placement (In VR). It is for UI Toolkit panels: a uGUI canvas of your own is not moved by it.

The reserved zones​

The zones are insets from each edge, in pixels of a 1920 x 1080 reference screen (the panels are scaled from it). These are the values the SDK uses today, before the Margin:

PlatformTopBottomLeftRightWhat is there
Desktop and WebGL962162424The top bar; the bottom bar, which takes the clicks across the lowest fifth of the screen
Desktop and WebGL, with the task panel+0+0+640+0The task panel on the left, added to the row above
Mobile, Content11248400400The top bar at the top right; the joystick at the bottom left and the jump button at the bottom right, so a centred column runs between them
Mobile, Edges1123842424The top bar; the two corner controls, from the bottom edge up

The device's own safe area (notch, home indicator) is taken from the operating system and added by the larger-of rule.

Desktop values are exact at 1080p and approximate on other screens, because part of the application's top and bottom bars scales with the camera's resolution rather than with the reference.

What this means for your own UI​

  • Keep what matters to the user, and the objects that must be clicked, out of the zones. On desktop and WebGL the bottom bar takes the clicks over its whole width, so an Interactable there receives none.
  • The task panel is placed by the Task UI Placeholder (see Task panel): with Hidden on a platform, or in the world, it takes no space on the screen. Safe Frame keeps the left zone for it on desktop and WebGL as soon as the scene has a Task UI Placeholder, whatever its placement; set Task Hud to Never when your panel does not need to avoid it.
  • The same numbers apply to anything else you draw over the screen: keep it inside the same areas, as in Scene setup.