|
Hello, I have made a texture render that I have applied to a camera in my scene. I was wondering if its possible to add this texture to a GUI window so I can get a little display window in my GUI, so I get a result like this (top left):
(comments are locked)
|
|
I recomend using 32bit bitmaps with alpha channel. In general 24bit bitmpas (Something like Windows BMP or JPG) have Red,Gren and Blue (aka RGB) per each pixel, wich means that they can only suport opaque color. With 32bit you are getting 8 bits more per each pixel, and you can save transparency for it in range from 0.0 to 1.0. (0.0 is min, 0.5 is in the middle and 1.0 max) You can create such bitmpas easily with tools like GIMP or Photoshop. I recommand saving your bitmaps to TGA or PNG format. (Unity supports both) p.s. 32bit bitmaps with alpha channel are also know as RGBA p.p.s. U can use http://google.com for more on bitmaps ;) But its not really a texture I'm applying, its a camera view using the Render Texture that I have applied to a camera within my scene ...
Nov 27 '10 at 12:29 AM
oliver-jones
In Unity GUI works like a state machine, if you call GUI.color = new Color( 1,1,1, 0.5f); before GUI.DrawTexture that will set your alpha to 0.5f, you will need to call GUI.color = new Color( 1,1,1,1); after it to reset the alpha to 1.
Nov 27 '10 at 11:07 AM
IJM
(comments are locked)
|
|
Managed to get it to work. I used this in the GUI function:
How would I apply a slight transparency to it? You should be able to just put GUI.color = new Color( 1,1,1, 0.5f); in front of the DrawTexture.
Nov 27 '10 at 02:47 AM
Molix
(comments are locked)
|

