GUI
GUI is a flat GUI object that is positioned in the world and to which different widgets are assigned to be displayed.GUI是一个平面GUI对象,位于世界上,并且与该对象不同小部件被分配显示。
Basically, a flat GUI object is a flat display, on which GUI is rendered. You can interact with such GUI the same way as with GUI created via the Gui class.基本上,平面GUI对象是在其上呈现GUI的平面显示器。您可以使用与通过Gui类创建的GUI相同的方式与此类GUI进行交互。
Post-process filters can be applied to a flat GUI object (for example, motion blur or any other).可以将后处理滤镜应用于平面GUI对象(例如,运动模糊或任何其他对象)。
See also也可以看看#
Creating GUICreating GUI#
You can add a GUI object via UnigineEditor and then assign a widget to it via UnigineScript.您可以通过UnigineEditor添加GUI对象,然后通过UnigineScript为它分配一个小部件。
To add the GUI:要添加GUI:
- Run the project with UnigineEditor.跑步UnigineEditor的项目。
On the Menu bar, click Create -> GUI -> GUI.在菜单栏上,单击Create -> GUI -> GUI。
- Place the created GUI in the world and specify the required parameters for it.将创建的GUI放置在世界上,为其指定所需的参数。
- In the code, get the GUI via the World.getNodeByName() (or World.getNodeByID() if the node index is known) and assign a widget to it by using functions of the ObjectGui class.在代码中,通过World.getNodeByName()(或World.getNodeByID(),如果知道节点索引)获取GUI,并使用ObjectGui类的函数为其分配小部件。
Editing GUIEditing GUI#
In the Node tab of the Parameters window, you can adjust the following parameters of the GUI object:在Parameters窗口的Node选项卡中,可以调整GUI对象的以下参数: