Hey guys, I’ve had some issues getting a day/night cycle going on.
I have a main time script below that checks the hours and is supposed to apply a color filter to the PostProcessingVolume. Found a couple similar threads for adjusting values through floats in the forums but none related to setting the color.
Here’s what I have. Tried a couple different variations with no success:
public class TimeSystem : MonoBehaviour
{
public Volume volume;
private ColorAdjustments colorAdjustments;
/*
Commented out since this didn't work either
Color earlyMorningColor = new Color(253, 127, 127);
Color morningColor = new Color(255, 255, 255);
Color afternoonColor = new Color(236, 236, 236);
Color eveningColor = new Color(176, 197, 197);
Color midnightColor = new Color(121, 125, 166);
public Gradient dayLight;
public Color earlyMorningShade;
public Color morningShade;
public Color afternoonShade;
public Color eveningShade;
public Color midnightShade;
*/
...
void Start()
{
volume = GetComponent<Volume>();
volume.profile.TryGet(out ColorAdjustments colorAdjustments);
}
void CalculateTimePeriods()
{
if (hour == 3 || hour == 4 || hour == 5 || hour == 6)
{
//volume.profile.TryGetSettings(out colorEarlyMorning);
//colorEarlyMorning.colorFilter.value = earlyMorningColor;
colorAdjustments.colorFilter.value = Color.HSVToRGB(253, 127, 127);
}
}

