Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Timer app feature color change

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

  1. CrazyViking10


    Sep 9, 2022
    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


    Jul 3, 2015
    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).