#Rotating skybox through code?

1 messages · Page 1 of 1 (latest)

hasty tinsel
#
[SerializeField] private Material _skybox;

    void Start()
    {
        if (SceneManager.GetActiveScene().buildIndex == 0)
        {
            // Set skybox rotation to 260
        }
        if (SceneManager.GetActiveScene().buildIndex == 1)
        {
            // Set skybox rotation to 1
        }
    }

Tried doing it like this :P

tepid nexus
#

I've never done it but you can probably just set some material properties like material.SetFloat after getting the skybox material applied to the scene

#

the last script there is so simple

hasty tinsel
#

RenderSettings was what I was looking for