GetColorArray
Get a named color array.
Read time 1 minuteLast updated 5 days ago
Definition
- Type: Method
- Namespace: UnityEngine
- Assembly: UnityEngine.CoreModule
GetColorArray(string)
Get a named color array.
public Color[] GetColorArray(string name)
Parameters
The name of the property.
Returns
Type | Description |
|---|---|
| Color[] |
Remarks
It is just an alias to Material.GetVectorArray, only colors are cast to vectors. No sRGB-linear conversion is done during the function call.
Additional Resources: Material.SetColorArray, Material.GetVectorArray.
GetColorArray(int)
Get a named color array.
public Color[] GetColorArray(int nameID)
Parameters
The name ID of the property retrieved by Shader.PropertyToID.
Returns
Type | Description |
|---|---|
| Color[] |
Remarks
It is just an alias to Material.GetVectorArray, only colors are cast to vectors. No sRGB-linear conversion is done during the function call.
Additional Resources: Material.SetColorArray, Material.GetVectorArray.
GetColorArray(string, List<Color>)
Fetch a named color array into a list.
public void GetColorArray(string name, List<Color> values)
Parameters
Remarks
The list will be resized to the array size, or cleared if such property doesn't exist. Memory allocation is guaranteed not to happen during the function call.
GetColorArray(int, List<Color>)
Fetch a named color array into a list.
public void GetColorArray(int nameID, List<Color> values)
Parameters
Remarks
The list will be resized to the array size, or cleared if such property doesn't exist. Memory allocation is guaranteed not to happen during the function call.