Can I change the color of the game?

Can I change the color of the game with an item that take from the ground or anywhere? But I want to do this with code, in other words with unity? I’m new to everything and sorry for my english. A little bad.

Yes you can change the color of objects with code. Since this is 2D they would be using the SpriteRenderer component.

When you mean change the color of the game do you mean the background? the character? something else?

1 Like

thanks for your reply. I want to change them all at the same time.

The easiest way to do that is to create a UI panel on the canvas. Think of it as a sheet of glass that you place over something and it can be a certain color to give everything a faint hue of whatever color that glass is.

Just go to GameObject-UI-Panel and it will add it to your scene. Once you have that you can add a script to it and change the color that way. This is probably easiest since you only have to change the color of one object. I will let you figure out how to change the color of the panel. Just google “How to change the color of UI panel via code in Unity” and you should be able to find it

Thanks. I will try and post the results.