|
Hi, Does anyone know how to render a 2D Texture with an attached element? I can't use Graphics.DrawTexture, because this is only available in the pro version. GUI.DrawTexture, cant use any material. The reason i want to do this, is that i want to change the color of an image in code. I can do this with the material and a Transparent/Cutoff/Diffuse shader on it. Thanks
(comments are locked)
|
|
You could just use GUI.color to change the colour of the texture:
Alternatively you could use a GUITexture, which will let you set the material Hi, Thank you for you comment. Unfortunaly i only want to color the inside of my texture. So for example, the inside of a box. Setting the GUI color doesnt work at all, even if i wanted to color all of my texture. I will have a look at the GUITexture thingie. Can you use shaders with that?
Nov 24 '10 at 10:58 PM
Maarten
Yeah, you can use any shader you like with them. Regarding GUI.color though - are you sure it doesn't do what you want it to do? I use it to tint single textures, exactly like changing the colour on a material
Nov 25 '10 at 12:38 AM
Mike 3
Take an arrow for example. I need to color the inside of the arrow (which is transparent), with an color to my choice. I can do this with an Transparent/Cutout/Diffuse shader, but if i use the GUI.Color nothing happens. I will have a look at the GUITexture now.
Nov 25 '10 at 09:41 AM
Maarten
Your arrow example works well with GUI.color at my end - the arrow itself is tinted, the alpha area around it isn't
Nov 25 '10 at 02:26 PM
Mike 3
Could you send me your arrow Mike? I cannot get it to work with GUI.Color. I've still got the Graphics.DrawTexture now.
Nov 30 '10 at 08:17 AM
Maarten
(comments are locked)
|
