We’ve included two different window prefabs, one built using Layout Groups, the other using RectTransform anchors. Both scale in a different way, so you can choose the one that better suits your needs and project setup.
Features:
color Hex input
RGB sliders / inputs
HSV palette
Dropper tool
Usage:
Simply drag the prefab to your canvas, choose whether you need an alpha channel, setup default color, assign its reference to your script and that’s all. You can access the color selected with either the SelectedColor property or subscribe to ColorUpdated event that will be fired when the color is selected in game.
Small fix: if anyone has issues with using dropper tool, please just drag one reference as on attached image.
Version with this fix should be on assetstore within week.
Thanks for your reply rakkarge. I’ve added link on top of description. I am aware that there are cheaper or free alternatives (and more expensive as well) packages available. If any of them would be useful enough for us, we’d never create this asset.
We have done it for our game, and then put additional week of polishing into it and are really happy with results
It has been tested by more than thousand players already and I believe it can definitely save some development time.
Hi there cr4y. I purchased your Asset and it’s great, but I do have an issue. If I put it inside a canvas that is set to render as Screen Space - Camera, clicking on the Palette to select a color doesn’t work. This is also true if I change the canvas in the example scene. It applies to both the Layout Groups and Anchor Scaling prefabs. Is there a way to make this work?
Also, no matter what I do, in my rather simple scene (nearly identical to the Example Scene in Hierarchy), I get the error “NullReferenceException: Object reference not set to an instance of an object
Dropper.Awake () (at Assets/Color Picker/Code/Components/Dropper.cs:25)” at the start of scene play. That points to the line:
Camera.main.targetTexture = renderTexture;
I’ve also gotten it once or twice in the Example Scene but I can’t seem to make it happen on command. It hasn’t affected operation yet, but I haven’t gotten very deep into implementation (i.e. using its values to affect any other elements) yet. Clicking the palette does work in my scene, as long as the containing canvas is set to Overlay (I’d rather use Camera but I’ll cope for now) but the error is a little unsettling. Any insight you can provide would be greatly appreciated. Thanks in advance.
Hi @lemondropkid ! I’m happy that you like the package. We’ll check your issue and reach you back on Monday.
Could you write me in PM your e-mail (in case if we’d have additional questions)?
New version with HSV sliders added has just been uploaded to the AssetStore (should be available to download within week).
Package was separately uploaded using Unity 5.5 and 2017 to improve compatibility within the range of these versions of Unity.
Was there a solution to this as I have bought the asset today and hit the same problem in Screen Space - Camera.
I need to run that Render mode for VR.
It seems like InverseTransformPoint gives different results in that mode in the following function:
How do I go about setting the initial color via script? I have tried both “colorPicker.SelectColor(c)” and “colorPicker.SelectedColor = c”, and I do get a callback saying that the color has changed, but then it immediately changes back to red.