In World Space UI, you can position, rotate, and scale UI elements like any other 2D or 3D objectA 3D GameObject such as a cube, terrain or ragdoll. More info
See in Glossary in the SceneA Scene contains the environments and menus of your game. Think of each unique Scene file as a unique level. In each Scene, you place your environments, obstacles, and decorations, essentially designing and building your game in pieces. More info
See in Glossary.
Key considerations:
The following examples demonstrate how these settings impact UI behavior in real-world scenarios.
As players progress through the game, they might receive tutorial and hint notifications, such as this example. These notifications are typically appear in front of the player, and their size might vary based on the content.
The following table describes the suggested settings:
Setting | Description |
---|---|
Size Mode: Dynamic | The menu adjusts its height based on the number of available options. |
Pivot Reference Size: Layout | Uses only the child document’s layout, ignoring positioned elements like pips or badges. This prevents occasional UI elements (for example, a badge in the menu’s corner) from shifting the entire layout. To include these elements in the size calculation, use Bounding Box instead. |
Pivot: Left Center | Keeps the UI positioned to the right of the player and ensures vertical expansion occurs from the center, avoiding unexpected shifts. |
Another example is an interactive terminal, like this one. These terminals typically appear in front of the player, and their size remains fixed, regardless of the content.
The following table describes the suggested settings:
Setting | Description |
---|---|
Size Mode: Fixed | Keeps the UI within a predefined screen size, ensuring consistency regardless of content length or complexity. |
Pivot Reference Size: Layout | Uses only the child document’s layout for size calculations, ignoring elements outside the layout to maintain consistent alignment. |
Pivot: Center | Centers the UI element based on its in-world position. Alternatively, you can use a top-left pivot, but with a fixed size, the result remains consistent. |
A map marker, like this one, is another example of a World Space UI element. Its size and position might change based on its content.
The following table describes the suggested settings:
Setting | Description |
---|---|
Size Mode: Dynamic | The tooltip or marker resizes dynamically to fit varying lengths of text, additional information, or other content. |
Pivot Reference Size: Bounding Box | Ensures that visual elementsA node of a visual tree that instantiates or derives from the C# VisualElement class. You can style the look, define the behaviour, and display it on screen as part of the UI. More infoSee in Glossary extending beyond the regular layout, such as badges, background glows, drop shadows, or special effects, are included in the container size calculation. This maintains consistent alignment even when elements like duration badges affect the container size. |
Pivot: Left Center | Ensures the map tooltip appears from a fixed point while allowing content to expand upward and away from the in-world elements the player interacts with. |