I have a sky gradient setup under a volume script using HDRP
The gradient works great but how would I change this in a c# script?
I was able to get the Volume component on the Scene Settings object, but I can’t figure out what methods to use to access the Gradient Sky.
Any help is appreciated, thanks.
This took way longer than it should have. Hdrp documentation on scripting is non existent. Here’s what I did for anyone who comes looking for a solution.
Volume volume = GetComponent<Volume>();
GradientSky sky;
volume.profile.TryGet(out sky);
sky.top.value = new Color(0, 0, 1);
3 Likes
Evonoucono:
This took way longer than it should have. Hdrp documentation on scripting is non existent. Here’s what I did for anyone who comes looking for a solution.
Volume volume = GetComponent<Volume>();
GradientSky sky;
volume.profile.TryGet(out sky);
sky.top.value = new Color(0, 0, 1);
THANK YOOOOU! Unity update your scripting docs please