This page has been translated automatically.
视频教程
界面
要领
高级
实用建议
基础
专业(SIM)
UnigineEditor
界面概述
资源工作流程
Version Control
设置和首选项
项目开发
调整节点参数
Setting Up Materials
设置属性
照明
Sandworm
使用编辑器工具执行特定任务
如何擴展編輯器功能
嵌入式节点类型
Nodes
Effects
Decals
光源
Geodetics
World Nodes
Sound Objects
Pathfinding Objects
Players
编程
基本原理
搭建开发环境
使用范例
C++
C#
UnigineScript
统一的Unigine着色器语言 UUSL (Unified UNIGINE Shader Language)
Plugins
File Formats
材质和着色器
Rebuilding the Engine Tools
GUI
双精度坐标
应用程序接口
Animations-Related Classes
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Objects-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
IG Plugin
CIGIConnector Plugin
Rendering-Related Classes
VR-Related Classes
创建内容
内容优化
材质
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Tutorials

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。

注意
The GUI will be rendered according to the UV mapping of surfaces.GUI将根据曲面的UV贴图进行渲染。

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

  1. Run the project with UnigineEditor.跑步UnigineEditor的项目。
  2. On the Menu bar, click Create -> GUI -> GUI Mesh.在菜单栏上,单击Create -> GUI -> GUI Mesh

  3. Specify a mesh on which the GUI will be rendered.指定将在其上呈现GUI的网格。
  4. Place the GUI Mesh in the world and specify the required parameters for it.GUI Mesh放置在世界上,为其指定所需的参数
  5. 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的以下参数:

Node tab, Gui Mesh sectionNode标签,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对象的高度(以像素为单位)。
最新更新: 2022-09-26
Build: ()