Table of Contents

Method WorldSpace

Namespace
Velvet
Assembly
Velvet.Docs.dll

WorldSpace(Vector3, Quaternion?, Vector2?, VNode?[]?, string?, PanelFocusOrder)

Renders children into a framework-owned world-space panel positioned by a scene transform — UI that lives among 3D content and is depth-tested against it, unlike the always-on-top screen-space layers. The host (GameObject + world-space panel) is created on mount, follows position / rotation updates, and is destroyed on unmount. Children stay part of the logical tree: context and state cross, and an events: handler on a logical ancestor of the call site also fires for a pointer / key / focus event raised on a child, bridged synthetically across the separate host Panel. Velvet does not arbitrate world-space pointer DELIVERY itself the way it does screen-space layer picking order: a BoxCollider sized to the panel is attached to the host, and Unity's own runtime input system drives picking and delivery through it once a Play session is running (see the package's cross-panel input routing docs). The event bridging above applies to whatever that system delivers, as well as to a programmatically dispatched event (e.g. in tests).

public static WorldSpaceNode WorldSpace(Vector3 position, Quaternion? rotation = null, Vector2? panelSize = null, VNode?[]? children = null, string? key = null, PanelFocusOrder focusOrder = PanelFocusOrder.Isolated)

Parameters

position Vector3

World position of the panel host.

rotation Quaternion?

World rotation of the panel host (identity when omitted).

panelSize Vector2?

Virtual panel resolution in pixels (fixed world-space size mode).

children VNode[]

Descendant VNodes rendered inside the world-space panel.

key string

Key used to disambiguate siblings at the same position.

focusOrder PanelFocusOrder

Returns

WorldSpaceNode

The created WorldSpaceNode.

Exceptions

ArgumentOutOfRangeException

focusOrder names no member of PanelFocusOrder.