Lightswitch

I’m running into a problem with a project I’m currently working on in which I have to make a “lightswitch” which makes a hard switch between day and night.

So far I’ve been able to change the skybox material and the ambient lighting in the rendersettings but I haven’t been able to access the Directional Light I use as a sun.
How would I go about this?

I got the impression those commands only work on lights created from scripts (and even with testing couldn’t get it to work on my editor placed light ;))

So I will try again but I think I’m gonna have to switch this light out for a scripted one.

No, all scripting functions work equally on all objects, no matter whether they are created in editor or at runtime. You just make a script that does something with a light, and attach it to the light itself.

Right, this could just be what I was doing wrong. I was trying to put it into a real “switch”…