GUI Mesh
A GUI Mesh is a non-flat GUI object based on an arbitrary mesh. If the mesh contains several surfaces, the same GUI will be rendered on each of them.GUI Mesh是基于任意网格的非平面GUI对象。如果网格包含多个表面,则将在每个表面上呈现相同的GUI。
Basically, the GUI Mesh is a non-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 Mesh是非平面显示器,在其上呈现GUI。您可以使用与通过Gui类创建的GUI相同的方式与此类GUI进行交互。
See also也可以看看#
- The ObjectGuiMesh class to edit GUI meshes via APIObjectGuiMesh类,用于通过API编辑GUI网格
A set of samples located in the data/samples/objects/ directory:位于data/samples/objects/目录中的一组样本:
Creating GUI Mesh创建GUI网格#
You can add a GUI Mesh via UnigineEditor and then assign a widget to it via UnigineScript.您可以通过UnigineEditor添加GUI Mesh,然后通过UnigineScript为它分配一个小部件。
To add the GUI Mesh:要添加GUI Mesh:
- Run the project with UnigineEditor.跑步UnigineEditor的项目。
On the Menu bar, click Create -> GUI -> GUI Mesh.在菜单栏上,单击Create -> GUI -> GUI Mesh。
- Specify a mesh on which the GUI will be rendered.指定将在其上呈现GUI的网格。
- Place the GUI Mesh in the world and specify the required parameters for it.将GUI Mesh放置在世界上,为其指定所需的参数。
- In the script, get the GUI object via the World.getNodeByName() (or World.getNodeByID() if you have the node index) and assign a widget to it by using functions of the ObjectGuiMesh class.在脚本中,通过World.getNodeByName()(或拥有节点索引的World.getNodeByID() if)获取GUI对象,并使用ObjectGuiMesh类的函数为其分配小部件。
Editing GUI Mesh编辑GUI网格#
In the Gui Mesh section of the Node tab, you can adjust the following parameters of the GUI Mesh:在Node选项卡的Gui Mesh部分中,可以调整GUI Mesh的以下参数:
Show Mouse | Indicates if the mouse cursor should be rendered in the GUI Mesh.指示是否应在GUI Mesh中呈现鼠标光标。 |
---|---|
Control Distance | Distance at which the GUI Mesh becomes controllable.GUI Mesh可控制的距离。 |
Screen Width | Width of the GUI object in pixels.GUI对象的宽度(以像素为单位)。 |
Screen Height | Height of the GUI object in pixels.GUI对象的高度(以像素为单位)。 |