- Home /
How to change color of text relative to current color?
I have been trying to put a system in place where some canvas text I have will change color every few seconds (or whenever a certain number of points/multiple of points is reached in my game). However, in order to make this a seamless thing, i've been trying to set it to, at random, pick color values only a few numbers (i'm using Color32) above and below the existing color, but though my code compiles, it doesn't seem to do anything in-game, my text not changing color at all.
Does anyone have a good way of making this happen? I'd post my code, but it's a little muddled at the moment, as i've been trying to fix this.
Answer by Vega4Life · Jul 21, 2019 at 03:22 PM
Try using a color lerp, where the value is your points (or however you want to do it.
Thanks. Was already considering this, so will definitely give it a try now.