ColorPicker Dialog
Note
See Windows Animations for open and closed animations.
Options
Color Picker
ColorPickerColorPicker.
Close Button
ButtonButton to close picker without selecting value.
Hide on Modal Click
boolClose picker on click on the background if the
modaloption enabled.Mode
PickerModeClose picker when value selected or when OK button clicked.
Ok Button
ButtonButton to select and close picker.
Code examples
namespace UIWidgets.Examples
{
using UIWidgets;
using UnityEngine;
using UnityEngine.UI;
public class TestColorPickerDialog : MonoBehaviour
{
[SerializeField]
ColorPickerDialog InputColor;
Color currentValue = Color.white;
async public void Test()
{
var result = await InputColor.Clone().ShowAsync(currentValue);
if (result.Success)
{
currentValue = result.Value;
Debug.Log("value: " + currentValue);
}
else
{
Debug.Log("canceled");
}
}
}
}