dentedpixel / LeanTween

LeanTween is an efficient animation engine for Unity
609 stars 135 forks source link

LeanTween.value Color on RenderSettings.ambientGroundColor affecting "Current Brightness" #90

Closed lebiru closed 7 years ago

lebiru commented 7 years ago

Unity 5.4.0f3

I am attempting to tween Ambient Ground Color, but the "Current Brightness" setting is flipping up to 99 for some reason.

LeanTween.value(entity.gameObject, Utils.ScaleGroundColor, RenderSettings.ambientGroundColor, Utils.neutralGroundColor, 2.0f).setEase(LeanTweenType.easeInOutBounce);

Utils.ScaleGroundColor is the following

public static void ScaleGroundColor(Color to)
{
  RenderSettings.ambientGroundColor = to;
}

Utils.neutralGroundColor is public static Color neutralGroundColor = new Color(0, 221, 129);

Is anyone else getting this issue or just me?

lebiru commented 7 years ago

This is how the scene looks with "Current Brightness" set to 99. Uh oh!

capture

dentedpixel commented 7 years ago

The colors seem to be tweening fine for me. What are the RenderSettings.ambientGroundColor, Utils.neutralGroundColor you are using? I think the problem might lie outside of the LeanTween engine itself and be something about the Unity setup...