How can I reset the exposing face of a rotating skybox at the beginning of a new scene?,

Hi

I have a game with several levels. I used the code below to make the skybox rotate constantly.

RenderSettings.skybox.SetFloat (“_Rotation”, Time.time * 0.2f);

Now I’d like to reset the rotation of my skyboxes at the beginning of each level and make it start rotating again from point zero (not continuing the rotation point of the previous level). I cannot access the component “Rotation” on the inspector for my skybox via something like “GetComponent<>” or such things.

Could someone please help me how I can set the component “Rotation” of my skyboxes to zero on my inspector at the start of each level?

Thank you in advance.

private float sceneStartTime;

private void Start()
{
    sceneStartTime = Time.time;
}

private void Update()
{
    RenderSettings.skybox.SetFloat ("_Rotation", (Time.time - sceneStartTime) * 0.2f);
}

Or more simply (thanks to Mouton suggestion in the comments)

private void Update()
{
    RenderSettings.skybox.SetFloat ("_Rotation", Time.timeSinceLevelLoad * 0.2f);
}

@Mouton, @Hellium
Thank you both for the great help.