Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more..
    Dismiss Notice
  3. Dismiss Notice

Can I change the color of the game?

Discussion in '2D' started by grumpytitan, Sep 23, 2020.

  1. grumpytitan

    grumpytitan

    Joined:
    May 31, 2020
    Posts:
    3
    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.
     
  2. Cornysam

    Cornysam

    Joined:
    Feb 8, 2018
    Posts:
    1,343
    grumpytitan likes this.
  3. grumpytitan

    grumpytitan

    Joined:
    May 31, 2020
    Posts:
    3

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

    Cornysam

    Joined:
    Feb 8, 2018
    Posts:
    1,343
    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
     
  5. grumpytitan

    grumpytitan

    Joined:
    May 31, 2020
    Posts:
    3
    Thanks. I will try and post the results.