- Home /
New Gui and iTween
Im using iTween to tween the alpha of a gui object but nothing is happening. Ive tried the same code with a gameobject and it works. Is there something new i need to think about regarding the new gui elements?
Hi, looking through the documentation for iTween I'm only finding that the way you tween GUI objects is if it's attached to a game object (http://itween.pixelplacement.com/documentation.php).
Perhaps you could use LeanTween ins$$anonymous$$d? This thread might be helpful: http://answers.unity3d.com/questions/248223/itween-and-unitygui.html
Answer by g8minhquan · Oct 16, 2014 at 01:31 PM
That's because the new Unity GUI in 4.6 use the Image component, not Sprite Renderer. You can tween the alpha by tweening the value of "color.a" of the "Image" component
EDIT: or you can just use the tween comes with the new GUI: "UI.Graphic.CrossFadeAlpha()" http://docs.unity3d.com/460/Documentation/ScriptReference/UI.Graphic.html
Your answer
Follow this Question
Related Questions
iTween colliders 1 Answer
How to pass string from input field using "OnSubmit (String)" 3 Answers
4.6 UI - overriding order / depth 1 Answer
How can I use iTween library to fade in a GUI.Label? 1 Answer
GUI Variable Declaration problem 0 Answers