GetColor
Get a named color value.
Read time 1 minuteLast updated 4 days ago
Definition
- Type: Method
- Namespace: UnityEngine
- Assembly: UnityEngine.CoreModule
GetColor(string)
Get a named color value.
public Color GetColor(string name)
Parameters
The name of the property.
Returns
Type | Description |
|---|---|
| Color |
Remarks
Many shaders use more than one color. Use GetColor to get the propertyName color.
Common color names used by Unity's builtin shaders:
"_Color""_SpecColor""_EmissionColor""_ReflectColor"GetColor(int)
Get a named color value.
public Color GetColor(int nameID)
Parameters
The name ID of the property retrieved by Shader.PropertyToID.
Returns
Type | Description |
|---|---|
| Color |
Remarks
Many shaders use more than one color. Use GetColor to get the propertyName color.
Common color names used by Unity's builtin shaders:
"_Color""_SpecColor""_EmissionColor""_ReflectColor"