Scene UI – Billboard

July 4, 2022

Scene UI – Billboard

A billboard is a GUI container that appears in a 3D scene. By setting the properties of the billboard, some common effects can also be done, such as the character’s name, health bar, title, etc. You need to prepare an example in the UI editor in advance.

The billboard supports always facing the camera and supports perspective relationships, allowing direct interaction when running in the scene.

new billboard

Billboards can be created directly in the scene. After creation, they will be displayed on the game map. The established billboards can be dragged between game objects or dragged into the scene. When the affiliation is changed by dragging, the position of the billboard will also be updated immediately

广告牌拖动.gif

billboard Attributes

Since the UI has only 2D properties, in order to facilitate the free display and interaction in the 3D scene, it is necessary to set the 3D properties to adapt to the 3D visual effect

Attributes Features
Awlays on Top Set the billboard to always be displayed at the top layer in the scene. If there are multiple billboards with this option set at the same time, the billboard that is closer to the camera will be displayed first.
广告牌最上层显示.gif
Always face the camera Set the orientation of the billboard to always face the camera, even if the player changes perspective, the billboard will still face the player. When set to not always face the camera, the billboard is fixed to the object.
广告牌面对摄像机.gif
coordinate Set the position of the billboard, where it can be placed in the scene, attached to the parent
rotate Set the orientation of the billboard (when [Always face the camera] is turned on, the rotation parameter is grayed out and cannot be filled in)
size Set the size of the billboard, which changes the size of the billboard container in the scene
visible distance Set the visible distance of the billboard, when the camera and the billboard exceed this distance, the billboard will be automatically hidden
UI file Set the layout file referenced by the billboard. If the file is already referenced, temporarily renaming or changing the file path will cause the billboard to display missing.
scale with distance Set the perspective relationship of the billboard, the farther the camera is from the billboard, the smaller the billboard will be
广告牌随距离缩放.gif
auto stretch Set whether the UI content is automatically stretched to the same size as the billboard container. Please pay attention to the aspect ratio of the billboard before setting, otherwise it will easily cause the proportion to be out of balance.
freeze rotation Set whether the rotation direction of the billboard is locked. After checking, even if the parent rotates, it will not affect the position of the billboard. For example, when the billboard is used as the character’s health bar, even after the character falls to the ground, the health bar will not be affected. fall to the ground

Notice: When using billboards, billboards cannot be nested billboards.