Skip to content

Build Spatial Interfaces

Create spatial controls from GameObject > Text Studio > 3D > Spatial UI. The menu provides Panel, Spatial Menu, Button, Toggle, Slider, Progress Bar, List, Dropdown, Input Field, Selector, Reposition Handle, and Spatial Keyboard. Each uses real Text Studio 3D output and can inherit fonts, named styles, interaction feedback, navigation, events, and accessibility metadata.

Choose the right root

  • Panel is a neutral container for a custom arrangement. Spatial Menu adds menu flow, a practical starting hierarchy, and navigation ownership.
  • Use ordinary transforms for fully spatial controls, World Space Canvas when Canvas organization helps, and Screen Space Camera for camera-composited 3D HUD content.
  • Screen Space Overlay cannot display real 3D geometry correctly. Use the guided conversion instead of flattening or hiding the result.

Controls and readable states

Every control combines a Text Studio label, optional Control Theme, interactable state, validation state, accessibility name and hint, and UnityEvents. Normal, Hover, Focused, Pressed, Selected, Disabled, and Error flags can combine without losing meaning. Tint, scale, and depth feedback update without rebuilding text topology.

  • Button exposes click, pointer, keyboard, focus, and accessible-label behavior.
  • Toggle owns a Boolean value and selected presentation. Slider owns range, step, track, formatting, and value changes.
  • Progress Bar presents a bounded value without an interactive drag state. List and Selector own option identity and navigation.
  • Dropdown keeps one compact selected value until opened, then reports open, index, and option changes.
  • Input Field owns value, placeholder, maximum length, read-only and required states, validation, focus, caret, submit, and text changes.

Spatial Keyboard and text entry

Spatial Keyboard provides an in-world key surface for Input Field without requiring a platform keyboard. Connect it to the intended field, verify focus and caret movement, and test representative Unicode with the active font and shaping backend. The optional Input System text adapter maps project input actions when hardware or platform text entry should participate.

Move the interface safely

Reposition Handle gives the player or designer an explicit affordance for moving a panel or menu. Keep it visually separate from ordinary buttons, constrain movement to the experience's safe bounds, and test release, lost focus, disable, and scene reload. A control should never become draggable merely because the pointer crossed its surface.

Pointer, navigation, layout, and pooling

Pointer Raycaster connects mouse, touch, or a ray with camera, layers, distance, hover, press, and selection. Navigation Group owns ordered keyboard or controller traversal, inactive-control filtering, wrap, first selection, and selection events. Focus remains independent from a List, Dropdown, or Selector value.

Control Layout arranges controls as Linear, Grid, Circular, Spline, or Volume forms. Option Presentation can use a stable Depth Stack, rotary choice, or radial selection while preserving option identity. Control Pool bounds repeated prefabs and restores value, validation, focus, events, and visual state before reuse. Temporary labels and gameplay feedback continue to use TextStudioEmitter rather than the control pool.

Menu Controller owns the current panel, bounded back history, Back, Close, and Close All. Menu Action exposes those commands to UnityEvents. Add Input System or XR Interaction Toolkit adapters only after the built-in pointer and navigation paths work. The optional adapters translate project actions or XR hover and select events; they do not replace the shared control state model.

Spatial interface production checklist

  1. Create a Spatial Menu or Panel and add only the controls the player needs.
  2. Assign a Control Theme and verify focus, selection, pointer, disabled, and error combinations under final lighting.
  3. Add Pointer Raycaster and Navigation Group, then test mouse, keyboard, controller, and any intended ray input.
  4. Connect Spatial Keyboard and Reposition Handle where their explicit affordances improve the experience.
  5. Test narrow, typical, and wide camera framing, fill every accessibility name and hint, and verify pooled controls return in a clean state.