We have fixed many issues with UniStorm and would like to give these fixes back to you. To be nice, and to save myself some time the next time I update Unistorm so I don't have to fix these issues again
I've commented most of my changes in the code, but here's a highlight of the changes:
– starSpeed changed to float to allow smaller incremental speed changes
– original fog color was being overwritten at runtime
– support for multiple cameras added. Didn’t change cameraObject to array, I added the ability to add additional cameras at runtime by calling the SetUpLightShafts function. if you want to change cameraObject to array, go for it.
– our cameras are created after application start, so I put the checks for null back in for cameraObject that this code used to have
– maxLightRainMistCloudsIntensity was in the inspector, but it wasn’t implemented. now implemented in FadeInPrecipitation() for weatherForecaster == 2, and in InstantWeather()
– Rain mist didn't turn off sometimes, like when changing from heavy rain to clear skies.
– with timeStopped = true, calling instant weather after setting the weather from stormy to clear didn’t get rid of the heavy clouds. Added code at the end of the instant weather function to set the alpha of the storm clouds to the storm cloud fade floats to fix this (see @StormCloudFix at about line 2990)
– LightningBolt.MillisecondsBetweenLinesFloat never changed value because it was assigned in InitializeLightning before the value was read from the inspector (UniSotrmWeatherSystem_C.SetLightningOptions)
– also changed MillisecondsBetweenLinesFloat to SecondsBetweenLinesFloat, since it was multiplied by .001, turning 10 milliseconds into .01 seconds, so I thought it was a better name
– at a framerate of 60 fps, can’t draw lightning faster than 16 milliseconds between segments. So setting the milliseconds below 16 would cause the lightning to draw slower than desired. This happened since the yield WaitForSeconds instruction waits a full frame before executing again. If it was supposed to wait for less than a frame’s time, it would still wait until the next frame.
– added some timescale stuff to lightning drawing, so it pays attention to timescale being other than 1. not fully working in slow motion, but better than it was
– compiler code #if UNITY_5_5 || UNITY_5_6 changed to #if UNITY_5_5_OR_NEWER to support Unity 2017 (or newer)
I've included updated class files. Also included patch files in GNU diff format, which can be applied using GnuWin http://gnuwin32.sourceforge.net/.
Let me know if you have any questions! And I'd love to hear what you think of all these changes