Controls how the Gradient inspector editor treats the color values.
Use this attribute on a Gradient public script variable. You can control the colorSpace and hdr flags.
using UnityEngine;
public class ExampleScript : MonoBehaviour { // Inspector editor for this gradient // allows to setup regular low dynamic range // colors. public Gradient defaultGradient;
// Inspector editor for this gradient allows // to setup HDR colors. [GradientUsage(true)] public Gradient hdrGradient; }
colorSpace | The color space the Gradient uses. |
hdr | 如果设置为 true,则渐变使用 HDR 颜色。 |
GradientUsageAttribute | Attribute for gradient fields. Used to configure the GUI for the Gradient Editor. |
order | 可选字段,用于指定多个 DecorationDrawer 应采用的绘制顺序。 |