Search Unity

Get LightingSettings from given Scene?

Discussion in 'Editor & General Support' started by ExodusOTH, Oct 19, 2020.

  1. ExodusOTH

    ExodusOTH

    Joined:
    Nov 30, 2017
    Posts:
    45
    Hello,

    Does anybody know how to get the LightingSettings from a given Scene?
    For example,

    I load a scene Additively.
    At the start of this, I tween the Lighting's fog's EndDistance down to 0.
    Once it's loaded, I want to tween the lighting and fog up to the desired level of the new LightingSettings (before actually setting this new scene to be the active one.

    I can't for the life of me figure out how to get a reference to an additively loaded scene's lighting settings, only whatever the current one is.

    Any help?
     
  2. ExodusOTH

    ExodusOTH

    Joined:
    Nov 30, 2017
    Posts:
    45
  3. najati

    najati

    Joined:
    Oct 23, 2017
    Posts:
    42
    I'd like to know how to do this, too. None of those threads ever got answers.

    Specifically, this seems to be the most effective way to manipulate the skybox in the Scene view in the editor. We have a dynamically created scene that we use for editor changes that we don't want persisted to Perforce. Skybox in RenderSettings is one of them.