Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/mattatz/unity-immediate-color-picker
- Owner: mattatz
- License: mit
- Created: 2017-07-04T06:40:15.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-07-05T01:48:51.000Z (over 7 years ago)
- Last Synced: 2024-10-03T12:29:46.148Z (about 1 month ago)
- Language: C#
- Size: 2.24 MB
- Stars: 41
- Watchers: 7
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-unity-open-source-on-github - unity-immediate-color-picker - Color picker for Unity in immediate GUI mode (Script Utility)
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.