Version:

Constant Gradient 组件

添加Constant Gradient组件,以创建具有相同值的输出渐变。

提供方

Gradient Signal Gem

Constant Gradient 属性

Constant 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
Value设置该梯度返回的单一值。Float: 0.0 - 1.01.0

ConstantGradientRequestBus

使用以下带有 ConstantGradientRequestBus EBus 接口的请求函数,可与游戏中的恒定渐变组件进行通信。

方法名称说明参数返回值脚本化
GetConstantValue返回 Value 属性的值。NoneConstant Value: FloatYes
SetConstantValue设置 Value 属性的值。Constant Value: FloatNoneYes