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
| output | The array to populate with random colors. |
| hueMin | The minimum hue [0..360] (default=0). |
| hueMax | The maximum hue [0..360] (default=360). |
| saturationMin | The minimum saturation [0..1] (default=0). |
| saturationMax | The maximum saturation [0..1] (default=1). |
| valueMin | The minimum value [0..1] (default=0). |
| valueMax | The maximum value [0..1] (default=1). |
| alphaMin | The minimum alpha [0..1] (default=1). |
| alphaMax | The maximum alpha [0..1] (default=1). |