Ok so its a bit strange that render settings is not working, the main reason being is I have the exact same script in my other game and it works fine, its a simple script. basically what happens is if I write the script the skybox will just give the default blue, I have been at this for hours, I’ve read everything online and can not find out what’s going on. the materials have been set in the inspector and everything checked and double checked.
I will write the script how I wrote it in Unity.
public Material dayMat;
public Material nightMat
void Update ()
{
if (Clock.hours >= 5 || Clock.hours <= 21) {
RenderSettings.skybox = dayMat;
} else {
RenderSettings.skybox = nightMat;
}
}
all this does is return the default blue sky and very strange I have the same script in my other game?
does anyone have the same problem or know anything ? thanks in advance.