|
Hello! I was wondering - has anybody figured out how to literally fade on a GUI? I really need this for my login script.... Seems obvious don't it? Thanks! Christian Stewart
(comments are locked)
|
|
To fade a GUITexture object:
Just apply that script to a Game Object that has a GUITexture component and it'll fade in and out. Modify it to do whatever you need it to do. I'd suggest possibly wrapping the fade inside of a coroutine instead of Update. [Edit] To do something similar with OnGUI(), add this to the above code:
Also take a look at the other 2 properties that are similar to GUI.color in the docs to isolate more specific parts of your GUI. Since OnGUI is immediate mode and procedural you can see that just redefining the color property later on in the script will produce different results in the same pass. Hope that helps. == Thanks, but I meant GUI created with the GUI class in scripting. This is great, thanks for the help, but its not exactly what I needed... Thanks though for the help!
May 22 '10 at 05:36 PM
user-1846 (google)
GUI meaning like text boxes and buttons :)
May 22 '10 at 05:37 PM
user-1846 (google)
Ah I see, thats a misunderstanding due to lexicon. I'll post another answer.
May 22 '10 at 06:17 PM
equalsequals
On second thought I'll just revise my previous answer. Cheers.
May 22 '10 at 06:18 PM
equalsequals
Very Nice man!
Jun 27 '11 at 07:33 AM
amir_bobo
(comments are locked)
|

Do you mean a GUITexture or a texture drawn using Unity GUI?