Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


GetGlobalColor

Gets a global color property for all shaders previously set using Shader.SetGlobalColor.
Read time 1 minuteLast updated 12 days ago

Definition

  • Type: Method
  • Namespace: UnityEngine
  • Assembly: UnityEngine.CoreModule

GetGlobalColor(string)

Gets a global color property for all shaders previously set using Shader.SetGlobalColor.
public static Color GetGlobalColor(string name)

Parameters

name

The name of the property.

Returns

Type

Description

Color

Remarks

It is only an alias to Shader.GetGlobalVector that the vector value is cast to color. No sRGB-linear conversion is done during the function call.
Additional Resources: Shader.GetGlobalVector.

GetGlobalColor(int)

Gets a global color property for all shaders previously set using Shader.SetGlobalColor.
public static Color GetGlobalColor(int nameID)

Parameters

nameID

The name ID of the property retrieved by Shader.PropertyToID.

Returns

Type

Description

Color

Remarks

It is only an alias to Shader.GetGlobalVector that the vector value is cast to color. No sRGB-linear conversion is done during the function call.
Additional Resources: Shader.GetGlobalVector.