Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mattatz/unity-immediate-color-picker

Color picker for Unity in immediate GUI mode
https://github.com/mattatz/unity-immediate-color-picker

Last synced: 17 days ago
JSON representation

Color picker for Unity in immediate GUI mode

Awesome Lists containing this project

README

        

unity-immediate-color-picker
=================

Color picker for Unity in immediate GUI mode.

![Demo](https://raw.githubusercontent.com/mattatz/unity-immediate-color-picker/master/Captures/Demo.gif)

## Usage

in a MonoBehaviour,

```cs

IMColorPicker colorPicker;

void OnGUI()
{
if(colorPicker == null)
{
colorPicker = new IMColorPicker();
}
colorPicker.DrawWindow(); // draw color picker UI with GUI.Window
colorPicker.DrawColorPicker(); // or draw color picker UI only
}

```

You can use color presets with IMColorPreset(ScriptableObject).

```cs

public IMColorPreset preset;
IMColorPicker colorPicker;

void OnGUI()
{
if(colorPicker == null)
{
colorPicker = new IMColorPicker(preset);
}
// ...
}

```

See example scenes for details.