[ColorPalette]

Displays a color field with a palette dropdown for quick color selection.

Support Types

Type
Description

Color

Unity Color struct

Parameters

Parameter Name
Arguments
Description

member

string

Name of a member that returns the color palette array.

Examples

using UnityEngine;
using RenownedGames.Apex;

public class ColorPaletteExample : MonoBehaviour
{
    [ColorPalette("GetPalette")]
    public Color myColor;

    private Color[] GetPalette()
    {
        return new Color[] { Color.red, Color.green, Color.blue };
    }
}

Last updated