Can't get rotating skybox to work in v2019.3.15f1

Viewed 59

So most google hits for rotating skybox suggest putting something this in an Update:

RenderSettings.skybox.SetFloat("_Rotation", Time.time * 1.23f);

Or something like this if you have a skybox component on your camera:

GetComponent<Skybox>().material.SetFloat("_Rotation", Time.time * 1.23f);

I've tried both with the first method (without a skybox component on the camera) and the second method (with a skybox component on the camera) and neither work. There is no error thrown fwiw. Also I am able to change the skybox material at runtime no problem, so it's not that I'm unable to access the material, it seems more that setting the _Rotation is having no effect.

Any advice appreciated. Thanks

1 Answers

I have just tested

void Update()
{
    RenderSettings.skybox.SetFloat("_Rotation", Time.time * 1.23f);
}

and it seems to work fine for me.

What type of shader are you using in your skybox material?
I just tested it with the Skybox/6 Sided shader.

Related