- Home /
How to make blinking effect on a GUITexture?
I'm trying to make a GUITexture blink and was trying to set it to null to achieve that effect. Is it possible? if not how do I make a blinking effect on a texture?
Answer by Eric5h5 · Dec 19, 2010 at 09:08 AM
You can, but it would be better to just disable the GUITexture component.
Thanks, I used GUITexture.enabled with Time.deltaTime but its not very smooth. Any other way of making a blinking texture?
I'm not quite sure what you mean. Blinking by definition isn't smooth; it's either on or off.
Sorry wrong word: its was not consistently turning off and off. $$anonymous$$y mistake, turned it on based on Time.deltaTime but turned it off based on update()-which is framebased. thanks.
Answer by TexeL · Dec 19, 2010 at 02:27 PM
Use GUITexture.color's Alpha channel to show & hide !!!
GUITexture a = new GUITexture();
a.color = new Color(a.color.r, a.color.g, a.color.b, 0.0f...1.0f);
It's a little better for performance to enable/disable, because if you use alpha, the texture is always drawn whether it's visible or not.
Yeap if he doing ONLY fliker like FX (On/Off), your way is best i think ! this solution is for making smooth FX !
Answer by efge · Dec 19, 2010 at 01:10 PM
You could use a MovieTexture (with smooth transitions) as a GUITexture.
(Take a look at this answer Video on a GUITexture.)
I might be wrong here, but won't that drag your performance down considerably?
Your answer
![](https://koobas.hobune.stream/wayback/20220613091628im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
The name 'Joystick' does not denote a valid type ('not found') 2 Answers
GUITexture scaling with aspect ratio? 1 Answer
Gui Texture Swap? 1 Answer
GUITexture is lagging my object 0 Answers
[Unity Free]Add textures to existing Unity DOF Shader 0 Answers