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
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  3. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    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