2D Toolkit Forum
2D Toolkit => Support => Topic started by: Lrateke on December 07, 2013, 04:17:28 am
-
I'm using a whole texture as a background using "Sprite from Texture" for my game and one thing I want to make is change the alpha of the sprite - like darkening it or making it invisible. How can I make that?
-
After its created, you'll see a sprite component on there. You can adjust the sprite alpha to modify it.
-
Well I tried, but I'm not finding. I tried to change the material to some of those that have "Transparency" but all of then darken the sprite, witch is something that I don't wish too. Also I want to change the alpha slowly on an animation, and I can't find a way...
-
You can't do it with the unity animation system. It doesn't work with properties.
I recommend using a tween package to do that - HOTween for example, works beautifully.
-
Thank you...
I've figured it out - After learning how to make it was pretty easy actually.
-
Thank you...
I've figured it out - After learning how to make it was pretty easy actually.
Care to share your solution? I'm in need of some alpha transforming as well ;)
[EDIT]
Found it myself as well -> myObject.color= new Color32(0,0,0,128); // Black & half-transparent Using it to gray-out non essential menu objects....