Sun Shafts - Use 'Centre On Main Camera' through script at runtime?
I have a system that uses a main scene (camera, directional light, character, etc.) which is loaded from the title screen, and then loads additive scenes (levels), and as you go between levels it just loads more additive scenes and hence uses this one main scene the whole time without unloading it/loading in new cameras and what not.
Anyway, in each different area, the sun will be in a different position (think Dark Souls, open world but each area is a different type of day), and I'd like the sun shafts to always be coming out of the directional light (Sun). I can achieve this currently in the editor if I angle the camera a certain way, pause the game window and click 'centre on main camera'.
My problem is quite clear; I cannot set this in script and this needs to be something I can change at will during runtime. Am I not seeing the proper variable from the SunShafts.cs script? Or is there another way to do this?
Thank you!