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.

Timer app feature color change

Discussion in 'General Discussion' started by CrazyViking10, Sep 12, 2022.

  1. CrazyViking10

    CrazyViking10

    Joined:
    Sep 9, 2022
    Posts:
    1
    Hi, I'm making personal projects for my portfolio and one of them involved a game with a timer. I thought I'd also make a timer app as well. But I want to jucie it up.
    My idea is that the user chooses a color scheme in settings and every time the app opens its the color the user selected in the previous session.
    I just started researching how to accomplish this however I would love some ideas on how to do this. I'd appreciate any help even if it's "not possible " I hope not though.
     
  2. DragonCoder

    DragonCoder

    Joined:
    Jul 3, 2015
    Posts:
    1,017
    In programming, nearly anything is possible ;)
    Development effort required and performance can be roadblockers, but neither would be the case here.

    To apply the colors to the clock, have some script which holds [SerializeField] references for the renderers of all UI elements. Those text and sprite renderers have "color" properties which allow you to set the color.
    To let the user select colors, use colored buttons and to save the selected color between sessions of the application, use "PlayerPrefs" (you'll have to store every color channel as a separate float).