Version:

Vegetation Asset List 组件

使用 Vegetation Asset List 组件将植被资产合并到可重用的资产列表中。 配置 Vegetation Asset Descriptors,这是特定于资产的设置,仅在从此组件的植被层生成资产时使用。 在 资产编辑器 中创建 Vegetation Descriptor List,或在组件界面中定义它们。

提供方

Vegetation Gem

Vegetation Asset List 属性

Vegetation Asset List component properties

属性说明默认值
Source Type如果设置为 ‘Embedded’,则在此组件的界面中定义植被资产描述符。 如果设置为 ‘External’,则在 Vegetation Descriptor List 资产中定义描述符。Embedded or ExternalEmbedded
Embedded Assets植被资产描述符的数组。

Asset 属性

属性说明默认值
Instance Spawner设置要生成的资产类型。Dynamic Slice, Empty Space, or PrefabDynamic Slice
Asset选择要生成的源资源。

仅当 Instance Spawner 设置为 ‘Dynamic Slice’ 或 ‘Prefab’ 时,此字段才可用。
Dynamic Slice 或 Prefab AssetNone
Weight设置资产实例的相对密度。 资产列表中权重较大的植被资产将比权重较小的资产更频繁地放置。Float: -Infinity to Infinity1.0
Display Per-Item Overrides显示 Vegetation Modifiers 和 Filters 设置的逐资产覆盖。BooleanDisabled

Vegetation Asset List component properties

属性说明默认值
Source Type如果设置为 ‘Embedded’,则在此组件的界面中定义植被资产描述符。 如果设置为 ‘External’,则在 Vegetation Descriptor List 资产中定义描述符。Embedded or ExternalEmbedded
External Assets选择为此组件提供描述符的 Vegetation Descriptor List 资产。Vegetation Descriptor List AssetNone

DescriptorListRequestBus

将以下请求函数与 ‘DescriptorListRequestBus’ 事件总线接口结合使用,以便与游戏中的 Vegetation Asset List 组件进行通信。

方法名称说明参数返回值可脚本化
AddDescriptor将描述符添加到资产列表。Vegetation DescriptorNoneYes
GetDescriptor从资产列表中返回植被描述符。Descriptor Index: IntegerVegetation DescriptorYes
GetDescriptorAssetPath返回资产列表的 External Assets 源路径。NonePath: StringYes
GetDescriptorListSource返回资产列表的 Source Type。对于 ‘Embedded’ 返回 ‘0’,对于 ‘External’ 源类型返回 ‘1’。NoneList Source Type: IntegerYes
GetNumDescriptors返回资产列表中的植被描述符的数量。NoneDescriptor Index: IntegerYes
RemoveDescriptor从资产列表中删除植被描述符。Descriptor Index: IntegerNoneYes
SetDescriptor在特定资产列表索引处设置描述符的配置。Descriptor Index: Integer, Vegetation DescriptorNoneYes
SetDescriptorAssetPath设置资产列表的 External Assets 源路径。Path: StringNoneYes
SetDescriptorListSource设置资产列表的 Source Type0 用于 Embedded1 用于 External源类型。List Source Type: IntegerNoneYes