Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


SetGradient

Sets the value of a named Gradient property.
Read time 1 minuteLast updated 6 days ago

Definition

SetGradient(int, Gradient)

Sets the value of a named Gradient property.
public void SetGradient(int nameID, Gradient g)

Parameters

nameID

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

The new Gradient value.

Remarks

Automatically changes overridden state for this property to true.

SetGradient(string, Gradient)

Sets the value of a named Gradient property.
public void SetGradient(string name, Gradient g)

Parameters

name

The name of the property.

The new Gradient value.

Remarks

Automatically changes overridden state for this property to true.