| r | 红色分量。 |
| g | 绿色分量。 |
| b | 蓝色分量。 |
| a | Alpha 分量。 |
使用给定的 r、g、b、a 分量构造新 Color。
using UnityEngine; using System.Collections;
public class ExampleClass : MonoBehaviour { public Color color = new Color(0.2F, 0.3F, 0.4F, 0.5F); }
| r | 红色分量。 |
| g | 绿色分量。 |
| b | 蓝色分量。 |
使用给定的 r、g、b 分量构造新 Color,然后将 a 设置为 1。
using UnityEngine; using System.Collections;
public class ExampleClass : MonoBehaviour { public Color color = new Color(0.2F, 0.3F, 0.4F); }