Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


BackgroundGradientStop

A single color stop in a BackgroundGradient.
Read time 1 minuteLast updated 6 days ago

Definition

public struct BackgroundGradientStop : IEquatable<BackgroundGradientStop>

Fields

Value

Description

colorColor of the stop.
positionPosition of the stop along the gradient axis. Interpretation depends on _positionIsPercent: when true, expressed as a fraction in [0,1]; when false, expressed as a length in element-local pixels.
positionIsPercentTrue when _position is a percentage (fraction of the gradient extent).

Static Methods

Method

Description

PercentConstruct a stop expressed as a percentage of the gradient extent.
PixelsConstruct a stop expressed as a pixel length along the gradient axis.