|
this question is about fading GUI color and size, using time So I've got a game in which you can get a checkpoint. When you enter the boxcollider a GUItexts renderer will get true and after a few seconds the renderer becomes false again. I wanted to make it stand out a littlebit more so I wanted it to popup big and green and then shrink to fontsize 60, become white and stay there for like a second. This should happen in about 3 or four seconds.
Thanks anyway,
(comments are locked)
|

You will need to decrease it with time. It appears you are doing instantly instead. I suggest subtracting X pixel sizes every frame/second.
This has to be done in a function that updates quickly though (such as Update or LateUpdate), and not in "once" function, such as OnTriggerEnter and OnCollisionEnter.
This should shrink it every frame (depending on which function your putting the code in), but it will eventually shrink to negative values. You will need to put a limit on how much it can shrink.
I hope this helps!