Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

unity - how to make a sprite fade-in gradually from one side to another

Tags:

unity3d

sprite

As above, on Unity, how to make a 2D sprite fade in (gradually increasing alpha) from one side (e.g. top) to another (e.g. bottom)?

like image 851
ExK Avatar asked Nov 10 '22 01:11

ExK


1 Answers

Once you learn a bit how to create custom shaders (you can use the built-in Unity 2018.1+ ShaderGraph, it's really handy and easy to use) all you had to do is multiply a gradient with aa input value and then connect the node to the alpha of your material.

Additionally, you can change the blending mode (Multiply,Add,Substract, etc...) in order to try different effects.

like image 181
Juan polanco lopez Avatar answered Dec 27 '22 10:12

Juan polanco lopez