- Home /
Question by
Bongmo · Apr 23, 2016 at 07:27 PM ·
textureimage effectssetpixelstint
How can I tint a texture?
I have a texture in Assets/Textures.
E.g. like this:
Now I want to tint this texture. Not like add a material and tint it.
I found this: SetPixels
It works. But my problem here is, that it only creates the same colors. I want different random colors.
Has somebody an idea how can I solve this?
zttttttint.png
(72.6 kB)
Comment
Are you using a ARGB32 texture ? and has this texture different mip levels?
http://docs.unity3d.com/ScriptReference/Texture2D.SetPixels32.html "This function works only on ARGB32 texture formats. For other formats SetPixels32 is ignored. The texture also has to have Is Readable flag set in the import settings."