Skip to main content

3D UI User Manual

Overview

This manual mainly describes how to create 3D UI Actor, which can be placed in the level or bounded to the equipment.

Creating 3D UI Actor

Click Create Game Object -> GUI -> Control 3D Object to create a 3D UI Actor in the level.

2022-11-29_093952

An empty 3D UI Actor will appear in the Scene if you select the LControl3DActor in the Hierarchy panel.

Picture2

Select Control3D(Inherited) -> Control3D -> 3d_control.ui in the Inspector panel in turn, or you can also drag the UI file from the Resource Preview window to the Control, and the UI file will be displayed in the Scene.

image-20220715155839738

The 3D UI file can be edited similarly to any other regular UI file.

image-20220715160033773

In this example, click any game button, the game name will be displayed on the form.selected of the label control. Here are the callback functions for clicking the three game buttons.

function ark_park_btn_click(self) 
local form = self.ParentForm
form.selected_lab.Text = nx_widestr("ArkPark Game")
end

function zombie_squad_btn_click(self)
local form = self.ParentForm
form.selected_lab.Text = nx_widestr("ZombieSquad Game")
end

function pix_ark_btn_click(self)
local form = self.ParentForm
form.selected_lab.Text = nx_widestr("PixArk Game")
end

Click the Play button in the Editor to enter the game scene, click the image and the game name will be displayed below.

image-20220715160323442