Change Render Settings (SkyBox) through code.

Hey guys,

short 'n sweet and possibly stupid question:

If I go Edit > Render Settings > Skybox Material I can set a skybox material.

Is there a way to change the material through code? So I could have several skyboxes added to my scene and the player can toggle which one is used?

Many thanks in advance. :-)

You could use RenderSettings.skybox.