Is it correct? The UITexture shows always a black image, ie, no texture.
This code is attached to a camera.
Title: Re: Render from camera to texture
Post by: ArenMook on July 21, 2015, 10:55:09 AM
Doesn't seem like an NGUI question here. More of a question on how ReadPixels works, I'd say. I have never used it myself, so I can't suggest much. I would ask why you are making a new texture every time though instead of reusing an existing one. Once you set UITexture's mainTexture reference, it will stay. You can reuse it.