组织性质
UNIGINE properties are organized in a hierarchy and managed via the Properties Hierarchy window. # UNIGINE属性组织在一个层次结构中,并通过Properties Hierarchy窗口管理。
The Properties Hierarchy window provides access to all properties of the project and allows filtering them by names, collapsing properties hierarchy (i.e., showing only base properties and hiding user ones), inheriting, cloning, reparenting, renaming, and deleting properties.Properties Hierarchy窗口提供了对项目所有属性的访问,并允许根据名称筛选它们,折叠属性层次结构(即,只显示基本属性并隐藏用户属性),继承、克隆、重命名和删除属性。
All properties in the hierarchy are linked to .prop files stored in your project's folder and available via the Asset Browser.层次结构中的所有属性都链接到存储在项目文件夹中的.prop文件,并通过Asset Browser可用。
To open the Properties Hierarchy window, choose Windows -> Toggle Property Hierarchy in the Menu Bar.要打开“Properties Hierarchy”窗口,请在菜单栏中选择“Windows -> Toggle Property Hierarchy”。
Creating a Property创建一个属性#
A property can be created via UnigineEditor in one of the following ways:通过UnigineEditor可以通过以下方式之一创建属性:
- By inheriting or cloning the existing property via the Properties Hierarchy window.通过Properties Hierarchy窗口继承或克隆现有属性。
- By creating or importing a property via the Asset Browser.By creating or importing a property via the Asset Browser.
The new property is automatically added to the properties hierarchy and displayed in the Properties Hierarchy window. The asset, to which the new property links, is also created and becomes available via the Asset Browser.新属性会自动添加到属性层次结构中,并显示在Properties Hierarchy窗口中。新属性链接到的资产也会被创建,并通过Asset Browser变得可用。
Basic Operations on a Property属性的基本操作#
The Properties Hierarchy window allows the following basic operations on a property.Properties Hierarchy窗口允许对属性进行以下基本操作。
Renaming a Property重命名属性#
To rename a property, right-click it and choose Rename in the drop-down list.要重命名属性,右键单击它并在下拉列表中选择Rename。
You can also rename a property asset via the Asset Browser: the property that links to it will be renamed as well.您还可以通过Asset Browser重命名属性资产:链接到它的属性也将被重命名。
Cloning a Property克隆一个属性#
To clone a property, right-click it and choose Clone in the drop-down list.要克隆一个属性,右键单击它并在下拉列表中选择Clone。
Another way to clone a property is to select it and click to the left of the property name filter.克隆一个属性的另一种方法是,选中它并单击左边的属性名过滤器。
The new property will be created at the same hierarchy level as the original one. Note that the child properties won't be cloned.新属性将在与原始属性相同的层次结构级别上创建。注意,子属性不会被克隆。
If you copy a property asset via the Asset Browser, the property that links to it will be cloned.如果你复制一个房地产资产通过Asset Browser属性链接到它将克隆。
Deleting a Property删除一个属性#
To delete a property, right-click it, choose Delete in the drop-down list and confirm deletion in the dialog window that opens:删除一个属性,右键单击它,选择下拉列表中的Delete并确认删除对话框窗口中打开:
Another way to delete a property is to select it and click to the left of the property name filter. If you delete a parent property, all its children will be deleted as well.删除属性的另一种方法是选择该属性并单击属性名称过滤器左侧的。如果删除父属性,则它的所有子属性也将被删除。
If you delete a property file via the Asset Browser, the property that links to it will also be deleted from the hierarchy.如果您通过Asset Browser删除一个属性文件,链接到它的属性也将从层次结构中删除。
Inheriting a Property继承财产#
Inheriting one property from another allows forming the properties hierarchy. To inherit a new property from the existing one, right-click the desired parent property and choose Inherit in the drop-down list.继承从另一个允许形成一个属性的属性层次结构。从现有继承一个新属性,右键单击所需的父母财产和Inherit下拉列表中选择。
Another way to inherit a property is to select it and click to the left of the property name filter.继承属性的另一种方法是选择它并单击属性名称过滤器左侧的。
Inheriting via Asset Browser通过资产浏览器继承#
To inherit a property via the Asset Browser, select the property asset, right-click it and choose Inherit in the drop-down list. The new property will be added to the Properties Hierarchy window and linked to the created asset.要通过Asset Browser继承属性,选择属性资产,右键单击它,并在下拉列表中选择Inherit。新的属性将被添加到Properties Hierarchy窗口并链接到创建的资产。
Assigning a Property指定一个属性#
A property can be assigned both to the whole node and the single surface. For example:A property can be assigned both to the whole node and the single surface. For example:
- A property assigned to the node can specify additional settings that extend the built-in ones. You can assign multiple properties to a single node.分配给节点的属性可以指定扩展内置设置的其他设置。您可以为一个节点分配多个属性。
- A property assigned to the surface can specify settings that can be used during physical interaction with the surface. Only one property can be assigned to a surface.属性分配给表面可以指定设置,可以使用在与表面物理交互。只有一个属性可以分配给一个表面。
It is recommended to inherit properties that will be assigned to nodes from the node_base property. However, you can also assign any custom base property or its children to a node.如果你需要为 single surface分配一个属性,它必须从surface_base属性继承。
建议从node_base属性继承将分配给节点的属性。但是,也可以将任何自定义基本属性或其子属性分配给节点。
要分配一个属性,选择节点,选择目标表面或多个表面(如果需要),并执行以下操作之一:
- Drag the property from the Properties Hierarchy window or the icon of the property asset from the Asset Browser to the target node or surface in the Editor Viewport. 将属性从Properties Hierarchy窗口或属性资产的图标从Asset Browser拖动到Parameters窗口的Node Property或Surface Property字段。
- Use the button next to the field with the property asset name in the Parameters window to choose the desired property asset. 从Properties Hierarchy窗口拖拽属性或属性的图标资产从Asset Browser到目标节点或表面在编辑器窗口。
- Type the name of the property asset to the field with the property asset name in the Parameters window manually. If an asset with the specified name exists in the project, it will be shown in the drop-down list while typing. 在参数窗口中,使用字段旁边的按钮和属性资产名称来选择所需的属性资产。
- 在参数窗口中手动输入属性资产的名称到字段,属性资产名称。如果一个具有指定名称的资产存在于项目中,它将在输入时显示在下拉列表中。