- Home /
Programmatically set Sun Game Object
Is there any way to programmatically set the Sun Game Object which is normally set in the editor? I'm spawning the player as a networked object, and spawning the sun with them - I'm using UniStorm to control weather and time. I'm getting strange lighting issues because Unity 5 automatically assigns the most intense light as the 'sun' if there is no preassigned game object. Thanks!
Same serching for this but couldn't find anythings in docs, trying to write script on baking lights with concrete parameters, miss not only sun but baking resolution, ambient occlusion value, switcher of Final Gather and few more in docs. Trying to get these from serialized object over LightmapEditorSettings but method which gettings settings is not public anymore.
Your answer
