Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


SetColorKeys(ReadOnlySpan<GradientColorKey>)

Setup gradient with an array of color keys.
Read time 1 minuteLast updated 4 days ago

Definition

  • Type: Method
  • Namespace: UnityEngine
  • Assembly: UnityEngine.CoreModule
public void SetColorKeys(ReadOnlySpan<GradientColorKey> keys)

Parameters

Array of color keys.

Remarks

Note that the color keys will be automatically sorted by time value and that it is ensured to always have a minimum of 2 color keys.