How to change or set the Ground and Sky Tint color of a Procedural Skybox through script?

Basically I’m trying to change these
through my code:

Color rndCol = new Color(spawner.RandVar(1), spawner.RandVar(1), spawner.RandVar(1));"_Tint", rndCol);
        RenderSettings.skybox.SetColor("_Tint", rndCol);

but I don’t see anything happening. I have no idea how to access those, but I feel like I should be able to, since they even have a color picker in the editor.

I searched a lot, but couldn’t find what I was looking for in the documentation, and answers to similar questions were SetColor(“_Tint”, color) and SetColor(“_Color”, color), which didn’t work. I also tried SetColor(“_Ground”, color) and SetColor(“_Sky Tint”, color), in both my material and the render settings skybox, also no results.

Thanks in advance for any help.

I’m not sure how to change the ground color, but you can change the skytint with string “_SkyTint” like so.


Keep in mind that if you change it, the change becomes permanent, even if you exit PlayMode. You might wanna cache the the color by putting in

private Color initialSkyTint;

As a field and

    initialSkyTint = RenderSettings.skybox.GetColor("_SkyTint");

In Start and

RenderSettings.skybox.SetColor("_SkyTiny", initialSkyTint);

In OnDestroy/OnDisable

I’m still trying to figure out the Ground as like you said, _Ground doesn’t work, but you can modify all other properties using “_Exposure”, “_SunSize” and “_AtmosphereThickness”.