- Home /
How can I make a layer black? Unity 2D
I'm making a 2D game and I want to simulate an effect where you can only see black silhouettes(so sprites going pitch black) for a short period of time. The only thing I can think of right now is to change the color of each sprite to black, but since I have multiple objects and this needs to happen in runtime that feels like too much and like there is a better way to do it.
Is there any way I can put these objects in a layer and make only that layer go pitch black?
Answer by ItsIcear · Feb 10, 2016 at 05:38 PM
Try creating an array of all the object that you want to be blacked out, then use a foreach loop to set all of the objects black. Or if the object are static and are in the same layer (ie forground, background) then make one large texture with all of the elements in, then set it to black
Your answer
Follow this Question
Related Questions
Sequence of Sprite Rendering in Unity? 1 Answer
[2D] Camera movement causes flickering/jittering sprites 2 Answers
Why do my sprites/textures darken whenever I move my camera? 0 Answers
Lines between Tiles 0 Answers
Sprite Shading 1 Answer