Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


FillGradient

Describes a fill gradient used for rendering filled shapes in Painter2D. The start, end, center, focus, and radius properties are pixel coordinate relative to the painter's coordinate system.
Read time 1 minuteLast updated 6 days ago

Definition

public struct FillGradient

Remarks

This struct encapsulates the data required to define a gradient fill, including the gradient itself, the type of gradient (linear or radial), and the parameters that control the direction or focus of the gradient.

Properties

Property

Description

addressModeSpecifies how the gradient is sampled when UV coordinates are outside the [0, 1] range.
centerThe center point for a radial gradient.
endThe end point for a linear gradient.
focusThe Focus point for radial gradient.
gradientThe color gradient used for the fill.
gradientTypeThe type of gradient to use (linear or radial).
radiusThe radius for a radial gradient.
startThe start point for a linear gradient.

Static Methods

Method

Description

MakeLinearGradientHelper method to create a linear gradient fill, using startColor and endColor to define the gradient.
MakeRadialGradientHelper method to create a radial gradient fill, using startColor and endColor to define the gradient.