Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Exposing Lighting "Sun" to API

Discussion in 'Graphics Experimental Previews' started by Stormy102, Jan 2, 2017.

  1. Stormy102

    Stormy102

    Joined:
    Jan 17, 2014
    Posts:
    495
    Hi,

    I've been struggling for a while with using Unity's lighting to control the procedural skybox. I have my scene set-up with two directional lights for the sun and moon. Due to the way levels are loaded (I have a multiplayer level with all the multiplayer code, such as the day/night cycle and a different level with geometry), the sun is not set in the lighting tab. This causes issues when the Sun light fades out and the moon light fades in, causing abnormal effects. This almost has 200 votes on the feedback site here. I figured this would be the best place to get attention to it, so hopefully this can make it into 5.6.x

    Regards,
    Matt

    EDIT:
    This is not reported enough. You can do it via the sun in Render Settings https://docs.unity3d.com/ScriptReference/RenderSettings-sun.html
    Not sure why people are not aware of this, myself included.
     
    Last edited: Feb 20, 2017