Camera.DOColor slow?
« on: January 20, 2016, 10:17:05 PM »
I am trying to tween the background color of the camera, going back and forth (the method calling the below code is called every second).  Picture a puzzle game with a timer, when the timer gets low I will change the bg color on each tick until the timer reaches 0. 

On the first call it runs normally.  On subsequent calls it seems to almost ignore my duration, the color blinks really quickly.  And there seems to be a delay before it starts.  If I just call Color.Lerp on each tick it changes the color instantly, when using this sequence there is a noticeable delay before it does anything (after the first call).


//this method gets called every second
void gameTick()
        if (gameTimer.TimeLeft <= 5)
                    .Append(Camera.main.DOColor(, .4f))
                    .Append(Camera.main.DOColor(new Color(255, 255, 255), .4f));

Re: Camera.DOColor slow?
« Reply #1 on: January 21, 2016, 12:05:37 AM »
Another strange issue, if I set the color from default (in my case white) to say new Color(255, 167, 167), it ignores my color.  If I say (for example) then it uses the color.

Camera.main.DOColor(, .4f) //will use color

Camera.main.DOColor(new Color(255, 167, 167), .4f) //ignores color, doesn't do anything

(latest Unity, 5.3x)