Documentation

Unity Engine

Download Unity

Unity Engine

Color(Color)

Sets current vertex color.
Read time 1 minuteLast updated 2 days ago

Definition

  • Type: Method
  • Namespace: UnityEngine
  • Assembly: UnityEngine.CoreModule
public static void Color(Color c)

Parameters

Remarks

In OpenGL this matches
glColor4f(c.r,c.g,c.b,c.a)
; on other graphics APIs the same functionality is emulated.
In order for per-vertex colors to work reliably across different hardware, you have to use a shader that binds in the color channel. See BindChannels documentation.
This function can only be called between GL.Begin and GL.End functions.