Skip to main content

Menus, hotbar and world panels

The HUD, the mobile button, the wrist button and every menu each have their own canvas.

A UIHudMenu slides in from its side: Left, Right, Top, Bottom or Center.

The main button​

The M key, the VR wrist button and the mobile MENU button act as one main button.

StateWhat the main button does
No main menu is openOpens every menu with Open with main button on, even if another menu is already open
A main menu is openCloses every open menu

It never opens or closes world panels.

A menu with its own key​

In the menu Inspector, set an Own desktop key, such as Q, or turn on Own wrist & mobile button. Turn Open with main button off for a menu that opens separately.

Behaviour​

  • Menus always open level, even when your head is tilted.
  • Opening a menu that is already open keeps it where it is, so a button inside it can switch pages.
  • On desktop and VR a menu stays where it opened, and closes when you walk Auto Close Distance away (2.5 by default). On mobile it follows the camera.
  • While a player types in a UIHudInput, menu keys and hotbar keys 1–9 are ignored. For a text input on a world panel outside the UIHUD object, set its Manager field.

Hotbar​

Create one with GameObject > UIHUD > Hotbar, or Hotbar > Add hotbar on the manager. It starts with 6 slots. Every child of its canvas is a slot, and Add slot ▾ accepts many widget kinds, not only buttons.

The hotbar is separate from the HUD: hiding one doesn't hide the other.

PlatformPlacementHow to use it
VRBelow your eyesLook down and point at a slot
DesktopBelow your viewLook down and click, or press 1–9
MobileBottom of the screenTap a slot

In VR and on desktop it follows your position but keeps its direction while you turn.

SettingDefaultMeaning
vrAngle45Degrees below eye level
vrDistance0.6Metres away, scaled by avatar height
followTurnAfter90Swings back in front after you turn this far. 0 = always turns with you, 180 = never.
vrTurnSmoothing8How smoothly it swings back
desktopLockToBodyonOff pins it to the bottom of the screen
mobileLockToBodyoffOn locks it to the body, as in VR

Show on turns it on or off per platform. Pressing a button slot selects it, tints it with selectedColor, and sends the hotbar's Event with the slot index. -1 means none.

World panels​

GameObject > UIHUD > World Panel (standalone) creates a menu that stays where you put it, for a kiosk, board or shop. It needs no manager. Any menu can switch between Player view and World (standalone) in its Inspector.

OptionMeaning
Visible at startShow it when the world loads
Scale (mm per px)1 by default, so 1200 × 820 px is 1.2 × 0.82 m
Move in front of the Scene cameraPlaces the panel where you are looking

Reopen a closed panel with a UIHudButton (Menu To Toggle or Open Menu), or call Open().

Containers​

Row, Grid, Scroll and Pages hold any widget, including other containers, to any depth. Pages can use tabs on the top or left side, or a < name > selector. Scroll can be vertical or horizontal. Turn on Absolute position on a widget to take it out of the list layout.

Editor tools​

  • Preview window (Window > UIHUD Preview): shows the HUD, a menu or a world panel as in game. Click selects a widget, and Alt+Click selects an exact part.
  • Style: New creates Assets/UIHUD Style.asset. The asset is used only in the editor. It repaints scene objects, and nothing reads it at runtime.

VRChat UI rules​

The builder sets these up. Keep them if you build parts by hand.

RuleReason
Canvases use the Walkthrough layerVRChat's pointer ignores UI and UiMenu unless the VRChat menu is open
Ui Shape and its BoxCollider are on the Canvas objectEach canvas catches only its own area
Focus View is off on canvases attached to the playerIt needs the player at least 0.6 m away
Exactly one EventSystemRequired for UI input
Navigation is NoneMovement input can't change controls
Raycast Target is off on textLabels don't block buttons
Event methods are publicUI calls them by name

Desktop players aim with the crosshair, or hold Tab to free the cursor.

note

Hide HUD From Camera (on by default) moves the HUD to the UI layer, so VRChat camera photos skip it unless the camera's UI option is on. The hotbar has the same option. Menus can't be hidden this way, because VRChat's pointer ignores that layer.

Standalone games​

Without the VRChat SDK:

  • The main camera is the head, and the feet are 1.6 m below it. Add UIHudStandalonePlayer for a real character.
  • Mouse and touch use an EventSystem with a StandaloneInputModule. Keyboard shortcuts need Input Manager or Both under Active Input Handling.
  • Pointing with VR controllers needs your own XR UI input module.
  • UIHUD uses unscaled time, so menus work while the game is paused.
  • Network sync does nothing, and Networking.IsOwner is always true.
  • The Examples sample scene works only in VRChat.