Version:

Reference Gradient组件

添加Reference Gradient组件,以便在**Open 3D Engine (O3DE)**关卡中参考并重新使用渐变。

提供者

Gradient Signal Gem

Reference Gradient 属性

Reference Gradient component properties

属性说明默认值
Preview显示该组件应用所有属性后的输出渐变效果。
Pin Preview to Shape设置一个具有兼容形状组件的实体,以便在Constrain to ShapeEnabled时用作预览的边界。EntityIdCurrent Entity
Preview Position设置预览的世界位置。

只有在Pin Preview to Shape中没有选择实体时,此字段才可用。*
Vector3: -Infinity to InfinityX:0.0, Y:0.0, Z:0.0
Preview Size设置预览的尺寸。Vector3: 0.0 to InfinityX:1.0, Y:1.0, Z:1.0
Constrain to Shape如果Enabled,渐变预览将使用在Pin Preview to Shape中选择的实体的边界。

此字段仅在Pin Preview to Shape中选择了实体时可用。
BooleanDisabled

Gradient 属性

Gradient properties

属性说明默认值
Gradient Entity Id设置具有活动 Gradient 组件的实体。EntityIdNone
Opacity设置输入渐变的不透明度。Float: 0.0 - 1.01.0
Invert Input反转输入梯度的值。BooleanDisabled
Preview (Input)显示由 Gradient Entity Id 中设置的实体提供的渐变。
Enable Transform如果Enabled,则可以修改输入梯度的平移、缩放和旋转。BooleanDisabled
Translate设置输入梯度的平移。Vector3: -Infinity to InfinityX:0.0, Y:0.0, Z:0.0
Scale设置输入梯度的比例。Vector3: 0.0 to InfinityX:1.0, Y:1.0, Z:1.0
Rotate设置输入梯度的旋转角度。Vector3: -Infinity to InfinityX:0.0, Y:0.0, Z:0.0
Enable Levels如果Enabled,则可以修改输入梯度的输入值和输出值。BooleanDisabled
Input Mid设置输入梯度的中值。Float: 0.0 - 1.01.0
Input Min设置输入梯度的最小值。Float: 0.0 - 1.00.0
Input Max设置输入梯度的最大值。Float: 0.0 - 1.01.0
Output Min设置输出梯度的最小值。Float: 0.0 - 1.00.0
Output Max设置输出梯度的最大值。Float: 0.0 - 1.01.0

ReferenceGradientRequestBus

使用以下带有 ReferenceGradientRequestBus EBus 接口的请求函数与游戏中的参考渐变组件进行通信。

方法名称说明参数返回值脚本化
GetGradientSampler返回在 Gradient Entity Id 中所选实体的渐变采样器对象。NoneGradient SamplerYes