Sorry if I re-open this thread, but I need a little help with this kind of stuff =P
I've fully created a color picker working with OnGui. Now, to avoid all the problems linked with this structure, i started working with Ngui. Here i've found some problems..
I created an UITexture in the scene, and with the OnPress/OnDrag functions i worked as you said..but it doesn't want to work =P
I used Texture2D.getpixel instead ReadPixel, as I did in my original script. I save my position during the OnPress with UICamera.lastTouchPosition, then I convert the x and y coord from float to int. At last I use getpixel. All this lines worked perfectly with my OnGui script, what I need to change to make it works?
The mainTexture in UITexture is a "Texture" type, not "Texture2D". Can be possible to use that texture for my Picker, without an extra cast..?
If i can't solve these problems, i'll work without OnPress function, but just with a normal raycast structure..
I'll wait for answers, thank you for your patience =P