- Home /
Directional light between scenes ( .LoadLevel)
Every time i .LoadLevel a new scene, one of my 2 directional lights doesn't appear as brightly as before, which makes my scene appear much darker than before. the light, however, still appears in my hierarchy. is there and code i could write into my StartGame function or my Restart function that would help with this? if not, please help me figure it out. I'm very new to Unity. Thank You!
Answer by lordlycastle · Mar 30, 2015 at 06:14 PM
You could create a prefab of the light that changes, and instantiate the prefab when your scene loads This way you would only have to change one light in either scenes and it be the same for all scenes.
Answer by UNZoOM · Mar 30, 2015 at 05:43 PM
According to my experience with similar problem , I used to disable and enable the Light from hierarchy.
So i am assuming , in your Restart function you could get the light component and disable and enable it.
Answer by KdRWaylander · Mar 31, 2015 at 10:22 AM
Hi,
You have a render mode option in your light component, if it's on auto, depending on what lights are already around in the scene Unity may put it "less important", maybe you can force the "important mode" ?