unity烘焙参数的程序化配置
参考网址:
https://forum.unity.com/threads/access-lighting-window-properties-in-script.328342/
https://github.com/Unity-Technologies/UnityCsReference/blob/master/Editor/Mono/SettingsWindow/LightingEditor.cs
烘焙的时候,每个场景的烘焙参数是不同的,所以如果是多个场景烘焙那么需要切换设置多次。
能否用一个配置文件,多个场景共用呢?答案是可以的。
其中通过代码设置的有两个部分:
一个部分是直接通过RenderSettings进行设置:
RenderSettings.ambientMode = bakeConfig.ambientMode;
RenderSettings.skybox = bakeConfig.skybox;
RenderSettings.ambientIntensity = bakeConfig.ambientIntensity;
还有一个部分是通过LightmapEditorSettings设置的:
https://forum.unity.com/threads/access-lighting-window-properties-in-script.328342/
参考:https://blog.csdn.net/wodownload2/article/details/105090284