Random.ColorsNonAlloc

Static Method in Random

Declaration

public static void ColorsNonAlloc(Color[] output, float hueMin = 0F, float hueMax = 360F, float saturationMin = 0F, float saturationMax = 1F, float valueMin = 0F, float valueMax = 1F, float alphaMin = 1F, float alphaMax = 1F)

Description

Fills an existing array with random colors to prevent heap allocations. The amount of colors generated is determined by the size of the array.

Parameters

outputThe array to populate with random colors.
hueMinThe minimum hue [0..360] (default=0).
hueMaxThe maximum hue [0..360] (default=360).
saturationMinThe minimum saturation [0..1] (default=0).
saturationMaxThe maximum saturation [0..1] (default=1).
valueMinThe minimum value [0..1] (default=0).
valueMaxThe maximum value [0..1] (default=1).
alphaMinThe minimum alpha [0..1] (default=1).
alphaMaxThe maximum alpha [0..1] (default=1).