- Home /
RenderSettings not overwritten when using LoadLevelAdditive
My TPS-game contains several Scenes besides the menu that have different maps. Each scene has its own environment, enemies and Render/LightSettings.
For buildsize reasons and faster developing I use a "base-scene" (think of a base class) which contains scene dependent elements like the canvas, player and Camera.
Also I have buttons on the canvas which use functions of the player, so making the canvas a prefab would lose all the onClick/eventTrigger references from the player.
The player itself is a prefab, so dropping them all together as one prefab (nested prefab) in the map-scenes to avoid the referencing issue is a nogo.
Therefore everytime I want to play a specific map, I first load from the menu the Base-Scene with the scene dependent elements and from there I load the actual map additively.
But the problem is that the blank RenderSettings from the base-scene are not overwritten from the particular map-scene which should be as it adds the scene, assuming including rendersettings to overwrite the current scenes' rendersettings. Instead, only the environment is beeing added.
So I think this issue is a bug from Unity (https://forum.unity3d.com/threads/unity-5-losing-skybox-sun-fog-on-loadleveladditive.312039/) but I dont know how to avoid this since my described scene management relies on additive loading.
I think better approach would be to use base scene just to load all necessary objects with all references and mark them as dont destroy on load, then you can load completly different scene with all persistent objects ready without using addictive loading that is always unpredictible