Table of Contents

Method DrawColors

Namespace
Gamelogic.Extensions.Editor.Internal
Assembly
Gamelogic.Extensions.Editor.dll

DrawColors(SerializedProperty, Rect)

Draws swatches for a property that is an array of colors.

public static void DrawColors(SerializedProperty colorsProp, Rect position)

Parameters

colorsProp SerializedProperty

The colors property.

position Rect

The position.

DrawColors(Color[], Rect, int, int, float, float)

Draws swatches for the list of colors.

public static void DrawColors(Color[] colorList, Rect position, int columns = 2, int maxColors = 100, float widthOffset = -2, float heightOffset = -2)

Parameters

colorList Color[]

The color list.

position Rect

The position where to draw the swatches.

columns int

The number of columns.

maxColors int

The maximum number of colors to draw.

widthOffset float

The width offset.

heightOffset float

The height offset.