A simple diagram showing how to access the feature via the UI.
Overview
This feature was developed by Jennifer Nordwall ( @JenniferNordwall ).
Improvements introduced by the Lighting Settings Asset (LSA) feature
Ability to change settings on multiple scenes and having more control in multi-bake scenarios.
Lighting settings are no longer a part of the Unity scene file; instead they are now located in an independent file that stores all the settings related to pre-computed GI.
Benefits to the users
Lighting settings can now be easily shared between different scenes.
Ability to toggle between different lighting settings quickly.
Lighting settings asset file can easily be assigned to a scene, removed or modified (either through the Inspector UI or API). This allows for much faster iterations when authoring lighting settings.
A single lighting settings asset file can be used by multiple scenes without need to manually tweak the settings for every scene.
Setup instructions Via the UI
Open Lighting window by navigating to Window > Rendering > Lighting.
Click on New Lighting Settings button located at the top of the window.
Your newly created Lighting Settings Asset is going to be assigned and located next to the opened sceneās file.
Either select the asset directly from the Project folder, or edit the asset in the Lighting window after assigning it to the Lighting Settings slot.
Note: Currently, the Lighting Settings asset will be automatically created in the folder located next to the Unity scene file when opening the scene after upgrading to the recent 2020.1.0/trunk branch, but only if the lighting settings of this upgraded scene were changed from the default values. We are going change that behavior for the upcoming 2020.1.0 beta version, so that the asset would only be created after making changes to the lighting settings of the upgraded scene (i.e. changing the lightmapper backend) and then manually saving the scene.
Via C# code Creating the asset:
Lightmapping.lightingSettings = new LightingSettings();
ProjectWindowUtil.CreateAsset(Lightmapping.lightingSettings, "My new lighting settings asset.lighting");
Feature access & feedback
You can get access to the feature by downloading the latest 2020.1 alpha build via the Unity Hub, or via this link - Unity Editor Alpha Releases. We are looking forward to hearing your feedback!
Is this not optional? Do I have to clutter my project with a gazillion lighting settings asset files so I can safely edit the settings of a certain scene without affecting other scenes?
Make sure that you have a LSA assigned in the Lighting Settings window. If thereās no asset assigned, you will not be able to edit any values in the Lighting Settings window.
Nah, itās some sort of bug. The asset is assigned correctly. It happens after I do a bake and itās only for inputting values with keyboard. If I click and drag to increase/decrease values, then it works properly (and uses the correct values). If I type values, nothing happens.
Probably some sort of UI bug that is unrelated to the LSA feature.
@AcidArrow is the Lighting Settings Asset actually assigned in the Lighting window? If it is not assigned, you will be viewing the default values which are not editable by design.
You need to start a bake and let if finish normally by itself for it to repro. Before I do that it seems to work fine. Iām using the GPU baker, not sure if it matters.
When Iām selecting the various fields in the video I am typing things. Please donāt ask me to record myself trying to type things.
I can edit values with a mouse, just not with a keyboard.
At around 11seconds, I am selecting the asset directly and editing it in inspector (just clarifying because I cut off the top by mistake). I can edit the asset in the inspector fine with both mouse and keyboard. And as you can see they update the settings in the lighting settings window, meaning the asset is set correctly.
I hope you can see that this mean that the asset is properly set in the lighting settings.
I will not submit a bug report, if this is not enough for you to fix it, then it might as well stay unfixed.
EDIT: 7. I did not try it in the video, but maybe you can take my word for it, copy pasting (with keyboard) also works.
Nice Work - this will be a massive improvement, thanks!.. very keen to try this as soon as I get a chance.
Could you tell me @JenniferNordwall@DavidLlewelyn - how these settings relate to baking a scene comprised from several sub scenes?
Light settings currently exist for each subscene. Though we endeavor to maintain a ālighting sceneā which holds our required bake settings, the settings will will invariably differ across the other subscenes. As a result we regularly get into a tangle due to the āwrongā subscene being active :
The overall ālookā may immediately differ (skybox, fog etc)
Baking may produce several directories of redundant baked data (named depending on active subScene)
AutoGenerate accidentally left on in any subscene exacerbates the above issue.
Clearly the first of these issues is fixed with your new settings - but what of the actual baking? Can the new settings also provide the āpathā to which the baked data is written, for example?
Currently, skybox and fog are part of the scene and render settings, which we havenāt moved to its separate file yet (and might never do since most of those things will be redone in the SRP workflow). So these settings will be attached to the active scene (which is also being used to fetch the current lighting settings). The active scene workflow is so rooted into how everything works in Unity, but hopefully the lighting settings workflow helped a bit with this.
As for the bake location, what problem will this solve? I just want to fully understand your situation and why this would be a good solution for you.
It would be extremely useful to have the lighting environment settings as a .asset. We modify the ambient color, and skybox as part of in game ātransformation eventsā in our scenes. Having the environment settings as asset would make previewing and setting this up in the editor much more straight forward.
Right not we just use a scriptable with a custom script, we can obviously keep doing this, but it would be easier if it was supported directly.
Why is this being generated every time I save a scene in 2020.1?
I have a 2D renderer, no lights in any scene, and all lighting settings are disabled everywhere in the project and URP.
All sprites use the UNLIT material.
Is this a bug?
I keep deleting the files every time they are generated to stop them clogging up my hierarchy for nothing.
It seems to be no way to choose default lighting settings (Settings.lighting). Iāve switched a project to 2020.1 and all the scenes got default settings, except one that got (None) and would only receive a separate settings.lighting asset. Itās a mild inconvenience but still looks like a bug.
Thank you all!
I am getting really weird maps though now ā¦
So I disabled all lights and probes in scene. Everything is set to Bake in Lighting tab. I even took off all environmental setting and I still get a bake but only generated @ runtimeā¦?
Is there a way to use the global asset by default and not generate an individual file for every scene now? The project clutter is highly undesirable for the majority of smaller unity projects that donāt require per scene global illumination settings.