Random.RandomTintsNonAlloc<T>
Extension Method in Random
Declaration
public static void RandomTintsNonAlloc<T>(this Color baseColor, Color[] output, float min = 0F, float max = 1F)
where T : struct, IComponentModel
Description
Fills an existing array with random tints of the base color to prevent heap allocations. The amount of colors generated is determined by the size of the array.
Type Parameters
T | The type of component model to use. |
Parameters
baseColor | The base color to generate new colors from. |
output | The array to populate with random colors. |
min | The minimum amount of change in the tints [0..1] (default=0). |
max | The maximum amount of change in the tints [0..1] (default=1). |