文档

Unity Engine

Unity Engine

GetGradient

Gets the value of a named Gradient property.
阅读时间1 分钟最后更新于 1 个月前

Definition

GetGradient(int)

Gets the value of a named Gradient property.
public Gradient GetGradient(int nameID)

Parameters

nameID

The ID of the property. This is the same ID that Shader.PropertyToID returns.

Returns

Type

Description

GradientThe value for the Gradient you specify. Returns an empty Gradient if VisualEffect.HasGradient returns
false
.

GetGradient(string)

Gets the value of a named Gradient property.
public Gradient GetGradient(string name)

Parameters

name

The name of the property.

Returns

Type

Description

GradientThe value for the Gradient you specify. Returns an empty Gradient if VisualEffect.HasGradient returns
false
.