Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: nospam94 on March 05, 2013, 04:58:04 AM
-
Hi,
i'm working on a color picker and i need to read pixel value of a sprite, i didn't find how so for now, i display the colorwheel as uisprite from uiatlas in a panel, and i read color in a texture asset. it works but it's memory waste because i have same picture in atlas and asset.
i tried to get the atlas texture access (playing with uisprite outer) but it's not readable.
can we access texture source of a sprite ?
i tried with simply uitexture but didn't seems to work as well as uisprite because shader is unlit/texture and i have transparency (is unlit/texture a requirement for uitexture ?)
-
Problem solved : i manage to do this with uitexture and getpixel and it works well.
but i understand that in fact i didn't need to readpixel of color wheel, i only need to get pixel coordinates on color picker texture and deal with HSB / RGB conversion.