Simply add the Color Picker object to a canvas in a scene using the prefab located in " Assets / unity-ui-extensions / Examples / ColorPicker". The JSON file name or the player pref key, the auto-generated one includes the GUID of the gameobject so multiple can exist without conflict (unless you set your own string to be the same on all ColorPickerPresets). None, JSON, PlayerPrefs - the mode used for saving user-defined presets. The max number of presets allowed (to control the UI size).Ĭolors that will be in the presets regardless of the user-defined presets. UI component for displaying the preset(s). The alphas slider (turns off if both RGB and HSV sliders are off).Įxample found on the Picker 2.0 / Presets prefab. Shows / hides the RGB sliders in te UI prefab.Ĭontains references to the components that are part of the RGB sliders display. Shows / hides the HSV sliders in te UI prefab.Ĭontains references to the components that are part of the HSV sliders display. The Event fired when the color within the picker is changed The properties of the Box Slider control are as follows: Property This should connect to the ColorPickerControl.CurrentColor at minimum. The outline of the cursor to make it easier to see what's being sampled.Ĭallback for when the cursor is clicked on a color. Properties Color Picker Control propertiesĮxample found on the Picker 2.0 prefab. Manages saving/loading presets to a JSON file or player prefs. Color SamplerĬaptures the screen when it is enabled, then provides a cursor with which the user can select colors from the screen. Like the other Unity UI controls, it includes an OnValueChanged event which outputs the Color of the control as it's changed. Uses the renderer material to expose the selected color from the combined control. Includes an optional Color Sampler to pick colors from the screen. Handles color sampling with a cursor as well as saving/loading presets.Ī generated Color Picker UI with prefab for use in Unity. A generated control using the new Box Slider control and several sliders with helpers.Ĭreates a Color Picker style control to generate color values within a Unity Project.
0 Comments
Leave a Reply. |