this[]
Access the red (r), green (g), blue (b), and alpha (a) color components using [0], [1], [2], [3] respectively.
Read time 1 minuteLast updated 4 days ago
Definition
- Type: Property
- Namespace: UnityEngine
- Assembly: UnityEngine.CoreModule
this[int]
public byte this[int index] { get; set; }
Parameters
Returns
Type | Description |
|---|---|
| byte |
Examples
using UnityEngine;public class Example : MonoBehaviour{ Color32 color = new Color32(0, 0, 0, 0); void Start() { //The same as color.g = 255 color[1] = 255; }}