Hello community,
In HDRP’s Volume component, I want to lerp the color in gradient sky by script.
I have set the UpdateMode to “realtime” and the Update Period to “0”,
and here is my script:
public GradientSky daySky;
public Volume vol;
void Start(){
vol.profile.TryGet(out daySky);
}
void Update(){
daySky.top.value = Color.Lerp(Color.white, Color.black, (Mathf.Sin(Time.time * 0.4f) + 1f) / 2f);
}
I can see the “top color” is update in the inspector, but in the game scene nothing happen.
HDRP version 7.31
(PS: Update. The issue has solved when I update the HDRP version to 7.51)