Animation disappears after getComponent?
I have a little animation where a cloud of smoke explodes (2D sprite sheet) after its done u are left with a big grey cloud which fills the screen (this is supposed to happen) then i want it to fade away using color.alpha which i know how to do, but when all i do is imput this line:
GetComponent<Renderer>().material.color = color;
The sprite just instantly dissapears when its finished its animation, how and why does this happen because i really have no clue and i need that to change the alpha :/ any help would be greatly appreciated.
@cadeautje I know this is a bit older, but just a crazy thought - is it possible this has anything to do with sorting layers? Because in my past experience with Unity, sprites seem to vanish at times for no reason, that is until I found out about sorting layers. Uncheck the backgrounds and what not if need to. EDIT: Also, from my experience calling GetComponent shouldn't really do anything to anything until you start applying that variable (color) to something else.