Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[70% OFF!] UniStorm 5.2 - AAA Volumetric Clouds, URP Support, Weather, Sky, Atmospheric Fog, & More!

Discussion in 'Assets and Asset Store' started by BHS, Jan 27, 2012.

  1. Snownebula

    Snownebula

    Joined:
    Nov 29, 2013
    Posts:
    174
    Where can I find the Season icons?



    And how do I get on the beta for the screen effects?
     
  2. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    Thanks for the information regarding Lighting Box.

    Full support for CTS has been added and the same will be done for RTP and Uber.


    I've been talking with the developer and it sounds like everything should work, if using the 1 camera setup. I was able to get Lighting Box and will be working on adding support for it. The plan is to have Lighting Box use UniStorm's #if USING_UNISTORM define to integrate direct support for UniStorm within Lighting Box. If everything goes according to plan, this will allow Lighting Box to automatically detect UniStorm and set its settings according to what you've set with UniStorm. I will post some screenshots of Lighting Box and UniStorm when I get the chance.


    They should all be applied when using the "Advanced UniStorm UI Control" example. You shouldn't have to manually apply any sprites. Copy the canvas from the said example and it will have all the sprites already applied.
     
    AndyNeoman and Twoonebe like this.
  3. Snownebula

    Snownebula

    Joined:
    Nov 29, 2013
    Posts:
    174

    I am using the example scene, infact I am using this exact scene you suggest.
     
  4. Twoonebe

    Twoonebe

    Joined:
    Mar 30, 2013
    Posts:
    174
    I've been talking with the developer and it sounds like everything should work, if using the 1 camera setup. I was able to get Lighting Box and will be working on adding support for it. The plan is to have Lighting Box use UniStorm's #if USING_UNISTORM define to integrate direct support for UniStorm within Lighting Box. If everything goes according to plan, this will allow Lighting Box to automatically detect UniStorm and set its settings according to what you've set with UniStorm. I will post some screenshots of Lighting Box and UniStorm when I get the chance.

    Nice how long did you mean are you working on the integreation ?
     
  5. Snownebula

    Snownebula

    Joined:
    Nov 29, 2013
    Posts:
    174
    I figured out that problem, for some reason the icons were in the version called (Mobile) I don't need the extra version so I deleted it from my project, but did not notice that there was some dependents in it. I got it working :)
     
  6. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    I'm not sure, possibly a week or two.


    Great to hear! I'll be sure to get that fixed with the next update.
     
  7. Snownebula

    Snownebula

    Joined:
    Nov 29, 2013
    Posts:
    174
    How do I use real time for the time thing?
     
  8. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    You would just use UniStorm's API and Unity's DateTime. The script below will allow UniStorm to use real time as well as update. If you don't want the date updated, just remove that line.

    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4. using System;
    5.  
    6. public class UniStormRealTime : MonoBehaviour {
    7.  
    8.     UniStormWeatherSystem_C UniStormSystem;
    9.  
    10.     //Get the UniStorm system
    11.     void Start () {
    12.         UniStormSystem = FindObjectOfType<UniStormWeatherSystem_C>();
    13.     }
    14.  
    15.     void Update () {
    16.         UniStormSystem.SetTime(DateTime.Now.Hour,DateTime.Now.Minute); //Update the time to real time using Unity's Date.Time
    17.         UniStormSystem.SetDate(DateTime.Now.Month,DateTime.Now.Day,DateTime.Now.Year); //If desired, you can also update the date, but this doesn't have to be used.
    18.     }
    19. }
     
  9. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    UniStorm is currently on sale for 50% off on this week's Asset Store sale.

    For those who are interested, we have an updated demo that shows off UniStorm 2.4 using a procedurally generated terrain generated with Map Magic to explore endlessly. This demo allows you to control most weather types as well as the time of day.

    Get it here: https://www.assetstore.unity3d.com/en/#!/content/2714

    The 2.4 demo can be found here: UniStorm 2.4 Demo (244 MB)

    The vegetation used in this demo is from our newest asset called Ultimate Nature Pack.

    Note: The demo used Unity's new Post-Processing Stack image effects and procedural terrain generation. If these are too intensive for you computer, a less intensive version can be provided. Users often request this type of demo.
     
  10. Snownebula

    Snownebula

    Joined:
    Nov 29, 2013
    Posts:
    174
    How do we add UniStorm to MapMagic?

    Do you know how to get the current real season too btw?
     
  11. Twoonebe

    Twoonebe

    Joined:
    Mar 30, 2013
    Posts:
    174
    Hi , i see enviro is Photon rdy has unistorm some multiplayer integrations ?
     
  12. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    You just neee to have the UniStorm system hooked up to your player. There's nothing special you need to do.

    The real season would be handled with the real date. UniStorm handles the season according to the month.


    Hey there!

    A network example for Unet is in the works. There is already a Photon example that can be found here: https://forum.unity3d.com/threads/o...s-unistorm-mobile.121021/page-91#post-3049782
     
  13. Snownebula

    Snownebula

    Joined:
    Nov 29, 2013
    Posts:
    174
    It is still summer the last time I checked, The thing is changing the season to fall for some reason. Also for some reason the day is wrong. Do you know why is it so freeken dark at 7 pm?

     
  14. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    It seems like the season is a bit off. It changes the season based off the month. With the next update, I'll fix this by also adding in the day for calculating the season.

    If it's too dark at night, adjust your twilight colors to be brighter. This will help around 7 pm not be so dark. By default, night is also kind of dark so you may need to make it brighter.
     
  15. Snownebula

    Snownebula

    Joined:
    Nov 29, 2013
    Posts:
    174
    Here is my weather code if someone could help get it right.

    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4. using System;
    5.  
    6. public class UniStormRealTime : MonoBehaviour
    7. {
    8.  
    9.     UniStormWeatherSystem_C UniStormSystem;
    10.     WeatherReportConfig WeatherConditions;
    11.     string currentCondition = Weather.Condition.ToString();
    12.     public bool tempChanged = false;
    13.  
    14.     //Get the UniStorm system
    15.     void Start()
    16.     {
    17.         UniStormSystem = FindObjectOfType<UniStormWeatherSystem_C>();
    18.         WeatherConditions = FindObjectOfType<WeatherReportConfig>();
    19.     }
    20.  
    21.     void Update()
    22.     {
    23.         UniStormSystem.SetTime(DateTime.Now.Hour, DateTime.Now.Minute); //Update the time to real time using Unity's Date.Time
    24.         UniStormSystem.SetDate(DateTime.Now.Month, DateTime.Now.Day, DateTime.Now.Year); //If desired, you can also update the date, but this doesn't have to be used.
    25.     }
    26.  
    27.     void FixedUpdate()
    28.     {
    29.         if (tempChanged == false)
    30.         {
    31.             Debug.Log("The current condition is: " + currentCondition);
    32.         }
    33.  
    34.         if (currentCondition == "Unknown" && tempChanged == false)
    35.         {
    36.             UniStormSystem.weatherForecaster = 8;
    37.             tempChanged = true;
    38.         }
    39.         if (currentCondition == "ChanceFlurries" && tempChanged == false)
    40.         {
    41.             UniStormSystem.weatherForecaster = 2;
    42.             tempChanged = true;
    43.         }
    44.         if (currentCondition == "ChanceRain" && tempChanged == false)
    45.         {
    46.             UniStormSystem.weatherForecaster = 4;
    47.             tempChanged = true;
    48.         }
    49.         if (currentCondition == "ChanceSleet" && tempChanged == false)
    50.         {
    51.             UniStormSystem.weatherForecaster = 2;
    52.             tempChanged = true;
    53.         }
    54.         if (currentCondition == "ChanceThunderStorms" && tempChanged == false)
    55.         {
    56.             UniStormSystem.weatherForecaster = 11;
    57.             tempChanged = true;
    58.         }
    59.         if (currentCondition == "Clear" && tempChanged == false)
    60.         {
    61.             UniStormSystem.weatherForecaster = 8;
    62.             tempChanged = true;
    63.         }
    64.         if (currentCondition == "Cloudy" && tempChanged == false)
    65.         {
    66.             UniStormSystem.weatherForecaster = 9;
    67.             tempChanged = true;
    68.         }
    69.         if (currentCondition == "Flurries" && tempChanged == false)
    70.         {
    71.             UniStormSystem.weatherForecaster = 2;
    72.             tempChanged = true;
    73.         }
    74.         if (currentCondition == "Fog" && tempChanged == false)
    75.         {
    76.             UniStormSystem.weatherForecaster = 1;
    77.             tempChanged = true;
    78.         }
    79.         if (currentCondition == "Hazy" && tempChanged == false)
    80.         {
    81.             UniStormSystem.weatherForecaster = 1;
    82.             tempChanged = true;
    83.         }
    84.         if (currentCondition == "MostlyCloudy" && tempChanged == false)
    85.         {
    86.             UniStormSystem.weatherForecaster = 11;
    87.             tempChanged = true;
    88.         }
    89.         if (currentCondition == "MostlySunny" && tempChanged == false)
    90.         {
    91.             UniStormSystem.weatherForecaster = 7;
    92.             tempChanged = true;
    93.         }
    94.         if (currentCondition == "PartlyCloudy" && tempChanged == false)
    95.         {
    96.             UniStormSystem.weatherForecaster = 5;
    97.             tempChanged = true;
    98.         }
    99.         if (currentCondition == "PartlySunny" && tempChanged == false)
    100.         {
    101.             UniStormSystem.weatherForecaster = 12;
    102.             tempChanged = true;
    103.         }
    104.         if (currentCondition == "Rain" && tempChanged == false)
    105.         {
    106.             UniStormSystem.weatherForecaster = 12;
    107.             tempChanged = true;
    108.         }
    109.         if (currentCondition == "Sleet" && tempChanged == false)
    110.         {
    111.             UniStormSystem.weatherForecaster = 2;
    112.             tempChanged = true;
    113.         }
    114.         if (currentCondition == "Snow" && tempChanged == false)
    115.         {
    116.             UniStormSystem.weatherForecaster = 3;
    117.             tempChanged = true;
    118.         }
    119.         if (currentCondition == "Sunny" && tempChanged == false)
    120.         {
    121.             UniStormSystem.weatherForecaster = 8;
    122.             tempChanged = true;
    123.         }
    124.         if (currentCondition == "ThunderStorms" && tempChanged == false)
    125.         {
    126.             UniStormSystem.weatherForecaster = 3;
    127.             tempChanged = true;
    128.         }
    129.         UniStormSystem.temperature = System.Convert.ToInt16(Weather.TemperatureF);
    130.     }
    131. }
    132.  
    133. /*
    134. foggy = 1
    135. light snow / light rain = 2
    136. heavy snow / heavy rain = 3
    137. partly cloudy = 4
    138. partly cloudy = 5
    139. partly cloudy = 6
    140. mostly clear = 7
    141. clear = 8
    142. mostly cloudy = 11
    143. cloudy / foggy = 9
    144. lighning bugs = 10 and is summer
    145. heavy rain (no thuner) = 12
    146. falling fall leaves = 13 and is fall
    147.  
    148. 12    MostlySunny,
    149. 13    PartlyCloudy,
    150. 14    PartlySunny,
    151. 15    Rain,
    152. 16    Sleet,
    153. 17    Snow,
    154. 18    Sunny,
    155. 19    ThunderStorms,
    156.  
    157. 0   Unknown,
    158. 1    ChanceFlurries,
    159. 2    ChanceRain,
    160. 3    ChanceSleet,
    161. 4    ChanceSnow,
    162. 5    ChanceThunderStorms,
    163. 6    Clear,
    164. 7    Cloudy,
    165. 8    Flurries,
    166. 9    Fog,
    167. 10    Hazy,
    168. 11    MostlyCloudy,
    169.  
    170.         */
    171.  
     
  16. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    What exactly do you need help with?
     
  17. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    938
    I'm getting this error since last update (i'm using unity 2017.1.1)

    NullReferenceException: Object reference not set to an instance of an object
    UniStormWeatherSystem_C.SetLightningOptions () (at Assets/UniStorm (Desktop)/Scripts (Desktop)/UniStorm Systems/UniStormWeatherSystem_C.cs:937)
    UniStormWeatherSystem_C.InitializeUniStorm () (at Assets/UniStorm (Desktop)/Scripts (Desktop)/UniStorm Systems/UniStormWeatherSystem_C.cs:913)
    UniStormWeatherSystem_C.Start () (at Assets/UniStorm (Desktop)/Scripts (Desktop)/UniStorm Systems/UniStormWeatherSystem_C.cs:588)

    Cant see anything missing in the inspector.
     
  18. Snownebula

    Snownebula

    Joined:
    Nov 29, 2013
    Posts:
    174
    Getting the coding right. Is this how you are suppose to change the weather?

    This part isn't getting the correct weather, its not getting it at all.

    Code (CSharp):
    1. currentCondition == "ChanceFlurries"
    it is an enum WeatherCondition and I am having a lot of trouble working with that. I have never used enums before.
     
    Last edited: Sep 11, 2017
  19. Snownebula

    Snownebula

    Joined:
    Nov 29, 2013
    Posts:
    174
    This is what I came up with but I am getting the real weather after my weather got set in the game. How can I make it like a hook or something so I can change the weather in the game. Can you just keep changing the weather constantly over and over? Do I need the bools? Will it work if I remove them? I really need some help. This code does get the weather but it gets it too late after the bool has been changed to it TRUE.

    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4. using System;
    5.  
    6. public class UniStormRealTime : MonoBehaviour
    7. {
    8.  
    9.     UniStormWeatherSystem_C UniStormSystem;
    10.  
    11.     public bool tempChanged = false;
    12.    
    13.  
    14.     //Get the UniStorm system
    15.     void Start()
    16.     {
    17.         UniStormSystem = FindObjectOfType<UniStormWeatherSystem_C>();
    18.     }
    19.  
    20.     void Update()
    21.     {
    22.         UniStormSystem.SetTime(DateTime.Now.Hour, DateTime.Now.Minute); //Update the time to real time using Unity's Date.Time
    23.         UniStormSystem.SetDate(DateTime.Now.Month, DateTime.Now.Day, DateTime.Now.Year); //If desired, you can also update the date, but this doesn't have to be used.
    24.     }
    25.  
    26.     void FixedUpdate()
    27.     {
    28.         /*
    29.         if (tempChanged == false && FindObjectOfType<WeatherReportConfig>())
    30.         {
    31.             Debug.Log("The current condition is: " + Weather.Condition); //currentCondition);
    32.         }
    33.        
    34.         if (System.Convert.ToString(Weather.Condition) == "Unknown" && tempChanged == false)
    35.         {
    36.             UniStormSystem.weatherForecaster = 8;
    37.             tempChanged = true;
    38.         }
    39.         if (System.Convert.ToString(Weather.Condition) == "ChanceFlurries" && tempChanged == false)
    40.         {
    41.             UniStormSystem.weatherForecaster = 2;
    42.             tempChanged = true;
    43.         }
    44.         if (System.Convert.ToString(Weather.Condition) == "ChanceRain" && tempChanged == false)
    45.         {
    46.             UniStormSystem.weatherForecaster = 4;
    47.             tempChanged = true;
    48.         }
    49.         if (System.Convert.ToString(Weather.Condition) == "ChanceSleet" && tempChanged == false)
    50.         {
    51.             UniStormSystem.weatherForecaster = 2;
    52.             tempChanged = true;
    53.         }
    54.         if (System.Convert.ToString(Weather.Condition) == "ChanceThunderStorms" && tempChanged == false)
    55.         {
    56.             UniStormSystem.weatherForecaster = 11;
    57.             tempChanged = true;
    58.         }
    59.         if (System.Convert.ToString(Weather.Condition) == "Clear" && tempChanged == false)
    60.         {
    61.             UniStormSystem.weatherForecaster = 8;
    62.             tempChanged = true;
    63.         }
    64.         if (System.Convert.ToString(Weather.Condition) == "Cloudy" && tempChanged == false)
    65.         {
    66.             UniStormSystem.weatherForecaster = 9;
    67.             tempChanged = true;
    68.         }
    69.         if (System.Convert.ToString(Weather.Condition) == "Flurries" && tempChanged == false)
    70.         {
    71.             UniStormSystem.weatherForecaster = 2;
    72.             tempChanged = true;
    73.         }
    74.         if (System.Convert.ToString(Weather.Condition) == "Fog" && tempChanged == false)
    75.         {
    76.             UniStormSystem.weatherForecaster = 1;
    77.             tempChanged = true;
    78.         }
    79.         if (System.Convert.ToString(Weather.Condition) == "Hazy" && tempChanged == false)
    80.         {
    81.             UniStormSystem.weatherForecaster = 1;
    82.             tempChanged = true;
    83.         }
    84.         if (System.Convert.ToString(Weather.Condition) == "MostlyCloudy" && tempChanged == false)
    85.         {
    86.             UniStormSystem.weatherForecaster = 11;
    87.             tempChanged = true;
    88.         }
    89.         if (System.Convert.ToString(Weather.Condition) == "MostlySunny" && tempChanged == false)
    90.         {
    91.             UniStormSystem.weatherForecaster = 7;
    92.             tempChanged = true;
    93.         }
    94.         if (System.Convert.ToString(Weather.Condition) == "PartlyCloudy" && tempChanged == false)
    95.         {
    96.             UniStormSystem.weatherForecaster = 5;
    97.             tempChanged = true;
    98.         }
    99.         if (System.Convert.ToString(Weather.Condition) == "PartlySunny" && tempChanged == false)
    100.         {
    101.             UniStormSystem.weatherForecaster = 12;
    102.             tempChanged = true;
    103.         }
    104.         if (System.Convert.ToString(Weather.Condition) == "Rain" && tempChanged == false)
    105.         {
    106.             UniStormSystem.weatherForecaster = 12;
    107.             tempChanged = true;
    108.         }
    109.         if (System.Convert.ToString(Weather.Condition) == "Sleet" && tempChanged == false)
    110.         {
    111.             UniStormSystem.weatherForecaster = 2;
    112.             tempChanged = true;
    113.         }
    114.         if (System.Convert.ToString(Weather.Condition) == "Snow" && tempChanged == false)
    115.         {
    116.             UniStormSystem.weatherForecaster = 3;
    117.             tempChanged = true;
    118.         }
    119.         if (System.Convert.ToString(Weather.Condition) == "Sunny" && tempChanged == false)
    120.         {
    121.             UniStormSystem.weatherForecaster = 8;
    122.             tempChanged = true;
    123.         }
    124.         if (System.Convert.ToString(Weather.Condition) == "ThunderStorms" && tempChanged == false)
    125.         {
    126.             UniStormSystem.weatherForecaster = 3;
    127.             tempChanged = true;
    128.         }
    129.         */
    130.         Debug.Log("The current condition is: " + Weather.Condition);
    131.         if (System.Convert.ToString(Weather.Condition) == "Unknown" && tempChanged == false)
    132.         {
    133.             Debug.Log("Current UniStorm Conditions: " + UniStormSystem.weatherForecaster);
    134.             UniStormSystem.weatherForecaster = 8;
    135.             Debug.Log("UniStorm Conditions: " + UniStormSystem.weatherForecaster);
    136.             Debug.Log("Set Weather to 1");
    137.             tempChanged = true;
    138.         }
    139.         if (System.Convert.ToString(Weather.Condition) == "ChanceFlurries" && tempChanged == false)
    140.         {
    141.             Debug.Log("Current UniStorm Conditions: " + UniStormSystem.weatherForecaster);
    142.             UniStormSystem.weatherForecaster = 2;
    143.             Debug.Log("UniStorm Conditions: " + UniStormSystem.weatherForecaster);
    144.             Debug.Log("Set Weather to 2");
    145.             tempChanged = true;
    146.         }
    147.         if (System.Convert.ToString(Weather.Condition) == "ChanceRain" && tempChanged == false)
    148.         {
    149.             Debug.Log("Current UniStorm Conditions: " + UniStormSystem.weatherForecaster);
    150.             UniStormSystem.weatherForecaster = 4;
    151.             Debug.Log("UniStorm Conditions: " + UniStormSystem.weatherForecaster);
    152.             Debug.Log("Set Weather to 3");
    153.             tempChanged = true;
    154.         }
    155.         if (System.Convert.ToString(Weather.Condition) == "ChanceSleet" && tempChanged == false)
    156.         {
    157.             Debug.Log("Current UniStorm Conditions: " + UniStormSystem.weatherForecaster);
    158.             UniStormSystem.weatherForecaster = 2;
    159.             Debug.Log("UniStorm Conditions: " + UniStormSystem.weatherForecaster);
    160.             Debug.Log("Set Weather to 4");
    161.             tempChanged = true;
    162.         }
    163.         if (System.Convert.ToString(Weather.Condition) == "ChanceThunderStorms" && tempChanged == false)
    164.         {
    165.             Debug.Log("Current UniStorm Conditions: " + UniStormSystem.weatherForecaster);
    166.             UniStormSystem.weatherForecaster = 11;
    167.             Debug.Log("UniStorm Conditions: " + UniStormSystem.weatherForecaster);
    168.             Debug.Log("Set Weather to 5");
    169.             tempChanged = true;
    170.         }
    171.         if (System.Convert.ToString(Weather.Condition) == "Clear" && tempChanged == false)
    172.         {
    173.             Debug.Log("Current UniStorm Conditions: " + UniStormSystem.weatherForecaster);
    174.             UniStormSystem.weatherForecaster = 8;
    175.             Debug.Log("UniStorm Conditions: " + UniStormSystem.weatherForecaster);
    176.             Debug.Log("Set Weather to 6");
    177.             tempChanged = true;
    178.         }
    179.         if (System.Convert.ToString(Weather.Condition) == "Cloudy" && tempChanged == false)
    180.         {
    181.             Debug.Log("Current UniStorm Conditions: " + UniStormSystem.weatherForecaster);
    182.             UniStormSystem.weatherForecaster = 9;
    183.             Debug.Log("UniStorm Conditions: " + UniStormSystem.weatherForecaster);
    184.             Debug.Log("Set Weather to 7");
    185.             tempChanged = true;
    186.         }
    187.         if (System.Convert.ToString(Weather.Condition) == "Flurries" && tempChanged == false)
    188.         {
    189.             Debug.Log("Current UniStorm Conditions: " + UniStormSystem.weatherForecaster);
    190.             UniStormSystem.weatherForecaster = 2;
    191.             Debug.Log("UniStorm Conditions: " + UniStormSystem.weatherForecaster);
    192.             Debug.Log("Set Weather to 8");
    193.             tempChanged = true;
    194.         }
    195.         if (System.Convert.ToString(Weather.Condition) == "Fog" && tempChanged == false)
    196.         {
    197.             Debug.Log("Current UniStorm Conditions: " + UniStormSystem.weatherForecaster);
    198.             UniStormSystem.weatherForecaster = 1;
    199.             Debug.Log("UniStorm Conditions: " + UniStormSystem.weatherForecaster);
    200.             Debug.Log("Set Weather to 9");
    201.             tempChanged = true;
    202.         }
    203.         if (System.Convert.ToString(Weather.Condition) == "Hazy" && tempChanged == false)
    204.         {
    205.             Debug.Log("Current UniStorm Conditions: " + UniStormSystem.weatherForecaster);
    206.             UniStormSystem.weatherForecaster = 1;
    207.             Debug.Log("UniStorm Conditions: " + UniStormSystem.weatherForecaster);
    208.             Debug.Log("Set Weather to 10");
    209.             tempChanged = true;
    210.         }
    211.         if (System.Convert.ToString(Weather.Condition) == "MostlyCloudy" && tempChanged == false)
    212.         {
    213.             Debug.Log("Current UniStorm Conditions: " + UniStormSystem.weatherForecaster);
    214.             UniStormSystem.weatherForecaster = 11;
    215.             Debug.Log("UniStorm Conditions: " + UniStormSystem.weatherForecaster);
    216.             Debug.Log("Set Weather to 11");
    217.             tempChanged = true;
    218.         }
    219.         if (System.Convert.ToString(Weather.Condition) == "MostlySunny" && tempChanged == false)
    220.         {
    221.             Debug.Log("Current UniStorm Conditions: " + UniStormSystem.weatherForecaster);
    222.             UniStormSystem.weatherForecaster = 7;
    223.             Debug.Log("UniStorm Conditions: " + UniStormSystem.weatherForecaster);
    224.             Debug.Log("Set Weather to 12");
    225.             tempChanged = true;
    226.         }
    227.         if (System.Convert.ToString(Weather.Condition) == "PartlyCloudy" && tempChanged == false)
    228.         {
    229.             Debug.Log("Current UniStorm Conditions: " + UniStormSystem.weatherForecaster);
    230.             UniStormSystem.weatherForecaster = 5;
    231.             Debug.Log("UniStorm Conditions: " + UniStormSystem.weatherForecaster);
    232.             Debug.Log("Set Weather to 13");
    233.             tempChanged = true;
    234.         }
    235.         if (System.Convert.ToString(Weather.Condition) == "PartlySunny" && tempChanged == false)
    236.         {
    237.             Debug.Log("Current UniStorm Conditions: " + UniStormSystem.weatherForecaster);
    238.             UniStormSystem.weatherForecaster = 12;
    239.             Debug.Log("UniStorm Conditions: " + UniStormSystem.weatherForecaster);
    240.             Debug.Log("Set Weather to 14");
    241.             tempChanged = true;
    242.         }
    243.         if (System.Convert.ToString(Weather.Condition) == "Rain" && tempChanged == false)
    244.         {
    245.             Debug.Log("Current UniStorm Conditions: " + UniStormSystem.weatherForecaster);
    246.             UniStormSystem.weatherForecaster = 12;
    247.             Debug.Log("UniStorm Conditions: " + UniStormSystem.weatherForecaster);
    248.             Debug.Log("Set Weather to 15");
    249.             tempChanged = true;
    250.         }
    251.         if (System.Convert.ToString(Weather.Condition) == "Sleet" && tempChanged == false)
    252.         {
    253.             Debug.Log("Current UniStorm Conditions: " + UniStormSystem.weatherForecaster);
    254.             UniStormSystem.weatherForecaster = 2;
    255.             Debug.Log("UniStorm Conditions: " + UniStormSystem.weatherForecaster);
    256.             Debug.Log("Set Weather to 16");
    257.             tempChanged = true;
    258.         }
    259.         if (System.Convert.ToString(Weather.Condition) == "Snow" && tempChanged == false)
    260.         {
    261.             Debug.Log("Current UniStorm Conditions: " + UniStormSystem.weatherForecaster);
    262.             UniStormSystem.weatherForecaster = 3;
    263.             Debug.Log("UniStorm Conditions: " + UniStormSystem.weatherForecaster);
    264.             Debug.Log("Set Weather to 17");
    265.             tempChanged = true;
    266.         }
    267.         if (System.Convert.ToString(Weather.Condition) == "Sunny" && tempChanged == false)
    268.         {
    269.             Debug.Log("Current UniStorm Conditions: " + UniStormSystem.weatherForecaster);
    270.             UniStormSystem.weatherForecaster = 8;
    271.             Debug.Log("UniStorm Conditions: " + UniStormSystem.weatherForecaster);
    272.             Debug.Log("Set Weather to 18");
    273.             tempChanged = true;
    274.         }
    275.         if (System.Convert.ToString(Weather.Condition) == "ThunderStorms" && tempChanged == false)
    276.         {
    277.             Debug.Log("Current UniStorm Conditions: " + UniStormSystem.weatherForecaster);
    278.             UniStormSystem.weatherForecaster = 3;
    279.             Debug.Log("UniStorm Conditions: " + UniStormSystem.weatherForecaster);
    280.             Debug.Log("Set Weather to 19");
    281.             tempChanged = true;
    282.         }
    283.         UniStormSystem.temperature = System.Convert.ToInt16(Weather.TemperatureF);
    284.     }
    285. }
     
  20. Snownebula

    Snownebula

    Joined:
    Nov 29, 2013
    Posts:
    174
    Here is the code without all that extra stuff. It should work but it is constantly setting the weather witch I am not sure is good.

    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4. using System;
    5.  
    6. public class UniStormRealTime : MonoBehaviour
    7. {
    8.  
    9.     UniStormWeatherSystem_C UniStormSystem;
    10.    
    11.     //Get the UniStorm system
    12.     void Start()
    13.     {
    14.         UniStormSystem = FindObjectOfType<UniStormWeatherSystem_C>();
    15.     }
    16.  
    17.     void Update()
    18.     {
    19.         UniStormSystem.SetTime(DateTime.Now.Hour, DateTime.Now.Minute); //Update the time to real time using Unity's Date.Time
    20.         UniStormSystem.SetDate(DateTime.Now.Month, DateTime.Now.Day, DateTime.Now.Year); //If desired, you can also update the date, but this doesn't have to be used.
    21.     }
    22.  
    23.     void FixedUpdate()
    24.     {
    25.         if (System.Convert.ToString(Weather.Condition) == "Unknown")
    26.         {
    27.             UniStormSystem.weatherForecaster = 8;
    28.         }
    29.         if (System.Convert.ToString(Weather.Condition) == "ChanceFlurries")
    30.         {
    31.             UniStormSystem.weatherForecaster = 2;
    32.         }
    33.         if (System.Convert.ToString(Weather.Condition) == "ChanceRain")
    34.         {
    35.             UniStormSystem.weatherForecaster = 4;
    36.         }
    37.         if (System.Convert.ToString(Weather.Condition) == "ChanceSleet")
    38.         {
    39.             UniStormSystem.weatherForecaster = 2;
    40.         }
    41.         if (System.Convert.ToString(Weather.Condition) == "ChanceThunderStorms")
    42.         {
    43.             UniStormSystem.weatherForecaster = 11;
    44.         }
    45.         if (System.Convert.ToString(Weather.Condition) == "Clear")
    46.         {
    47.             UniStormSystem.weatherForecaster = 8;
    48.         }
    49.         if (System.Convert.ToString(Weather.Condition) == "Cloudy")
    50.         {
    51.             UniStormSystem.weatherForecaster = 9;
    52.         }
    53.         if (System.Convert.ToString(Weather.Condition) == "Flurries")
    54.         {
    55.             UniStormSystem.weatherForecaster = 2;
    56.         }
    57.         if (System.Convert.ToString(Weather.Condition) == "Fog")
    58.         {
    59.             UniStormSystem.weatherForecaster = 1;
    60.         }
    61.         if (System.Convert.ToString(Weather.Condition) == "Hazy")
    62.         {
    63.             UniStormSystem.weatherForecaster = 1;
    64.         }
    65.         if (System.Convert.ToString(Weather.Condition) == "MostlyCloudy")
    66.         {
    67.             UniStormSystem.weatherForecaster = 11;
    68.         }
    69.         if (System.Convert.ToString(Weather.Condition) == "MostlySunny")
    70.         {
    71.             UniStormSystem.weatherForecaster = 7;
    72.         }
    73.         if (System.Convert.ToString(Weather.Condition) == "PartlyCloudy")
    74.         {
    75.             UniStormSystem.weatherForecaster = 5;
    76.         }
    77.         if (System.Convert.ToString(Weather.Condition) == "PartlySunny")
    78.         {
    79.             UniStormSystem.weatherForecaster = 12;
    80.         }
    81.         if (System.Convert.ToString(Weather.Condition) == "Rain")
    82.         {
    83.             UniStormSystem.weatherForecaster = 12;
    84.         }
    85.         if (System.Convert.ToString(Weather.Condition) == "Sleet")
    86.         {
    87.             UniStormSystem.weatherForecaster = 2;
    88.         }
    89.         if (System.Convert.ToString(Weather.Condition) == "Snow")
    90.         {
    91.             UniStormSystem.weatherForecaster = 3;
    92.         }
    93.         if (System.Convert.ToString(Weather.Condition) == "Sunny")
    94.         {
    95.             UniStormSystem.weatherForecaster = 8;
    96.         }
    97.         if (System.Convert.ToString(Weather.Condition) == "ThunderStorms")
    98.         {
    99.             UniStormSystem.weatherForecaster = 3;
    100.         }
    101.         UniStormSystem.temperature = System.Convert.ToInt16(Weather.TemperatureF);
    102.     }
    103. }
     
  21. Snownebula

    Snownebula

    Joined:
    Nov 29, 2013
    Posts:
    174
  22. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    I would recommend doing it something like I've done below. It allows weather to be updated and changed at anytime, but only once by comparing the current weather type. A weather change only needs to be called once.

    Code (CSharp):
    1.  
    2. if (System.Convert.ToString(Weather.Condition) == "Clear" && UniStormSystem.weatherForecaster != 8){
    3.    UniStormSystem.ChangeWeather(8);
    4. }
    5. else if (System.Convert.ToString(Weather.Condition) == "PartlyCloudy" && UniStormSystem.weatherForecaster != 4){
    6.    UniStormSystem.ChangeWeather(4);
    7. }
    8. else if (System.Convert.ToString(Weather.Condition) == "ThunderStorms" && UniStormSystem.weatherForecaster != 3){
    9.    UniStormSystem.ChangeWeather(3);
    10. }

    I'm assuming you think it's too dark? I would agree, this can be fixed by adjusting your night and twilight colors. Most importantly, change your Ambient Source to Color or Gradient and set your colors brighter. These can be found in the Lighting Options.
     
  23. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    938
    Hi @BHS

    Im still getting this error in the inspector, any idea why? unity 2017.1.1

    NullReferenceException: Object reference not set to an instance of an object
    UniStormWeatherSystem_C.SetLightningOptions () (at Assets/UniStorm (Desktop)/Scripts (Desktop)/UniStorm Systems/UniStormWeatherSystem_C.cs:937)
    UniStormWeatherSystem_C.InitializeUniStorm () (at Assets/UniStorm (Desktop)/Scripts (Desktop)/UniStorm Systems/UniStormWeatherSystem_C.cs:913)
    UniStormWeatherSystem_C.Start () (at Assets/UniStorm (Desktop)/Scripts (Desktop)/UniStorm Systems/UniStormWeatherSystem_C.cs:588)
     
    d1favero likes this.
  24. Wishymashy

    Wishymashy

    Joined:
    Jun 3, 2017
    Posts:
    16
  25. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    I'm not sure, I've never seen it before and the error doesn't lead to anything specifically. Did you use the Auto Player Setup system for setting up? I would recommend exporting your settings using the Import/Export Settings and creating a new UniStorm system for your scene using the Auto Player Setup system (press Shift+Ctrl+H) to see if it fixes your issue. Once you've done this, you can import your settings from your previous UniStorm system using the txt file UniStorm created while exporting.


    Great! My apologies that it's taking a little longer than expected.
     
  26. Snownebula

    Snownebula

    Joined:
    Nov 29, 2013
    Posts:
    174
    What code do I need to fix to fix the seasons?


    To anyone who wants to combine Weather Report Plugin and UniStorm here is the script:


    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4. using System;
    5.  
    6. public class UniStormRealTime : MonoBehaviour
    7. {
    8.  
    9.     UniStormWeatherSystem_C UniStormSystem;
    10.    
    11.     //Get the UniStorm system
    12.     void Start()
    13.     {
    14.         UniStormSystem = FindObjectOfType<UniStormWeatherSystem_C>();
    15.     }
    16.  
    17.     void Update()
    18.     {
    19.         UniStormSystem.SetTime(DateTime.Now.Hour, DateTime.Now.Minute); //Update the time to real time using Unity's Date.Time
    20.         UniStormSystem.SetDate(DateTime.Now.Month, DateTime.Now.Day, DateTime.Now.Year); //If desired, you can also update the date, but this doesn't have to be used.
    21.     }
    22.  
    23.     void FixedUpdate()
    24.     {
    25.         if (System.Convert.ToString(Weather.Condition) == "Unknown" && UniStormSystem.weatherForecaster != 8)
    26.         {
    27.             UniStormSystem.weatherForecaster = 8;
    28.         }
    29.         if (System.Convert.ToString(Weather.Condition) == "ChanceFlurries" && UniStormSystem.weatherForecaster != 2)
    30.         {
    31.             UniStormSystem.weatherForecaster = 2;
    32.         }
    33.         if (System.Convert.ToString(Weather.Condition) == "ChanceRain" && UniStormSystem.weatherForecaster != 4)
    34.         {
    35.             UniStormSystem.weatherForecaster = 4;
    36.         }
    37.         if (System.Convert.ToString(Weather.Condition) == "ChanceSleet" && UniStormSystem.weatherForecaster != 2)
    38.         {
    39.             UniStormSystem.weatherForecaster = 2;
    40.         }
    41.         if (System.Convert.ToString(Weather.Condition) == "ChanceThunderStorms" && UniStormSystem.weatherForecaster != 11)
    42.         {
    43.             UniStormSystem.weatherForecaster = 11;
    44.         }
    45.         if (System.Convert.ToString(Weather.Condition) == "Clear" && UniStormSystem.weatherForecaster != 8)
    46.         {
    47.             UniStormSystem.weatherForecaster = 8;
    48.         }
    49.         if (System.Convert.ToString(Weather.Condition) == "Cloudy" && UniStormSystem.weatherForecaster != 9)
    50.         {
    51.             UniStormSystem.weatherForecaster = 9;
    52.         }
    53.         if (System.Convert.ToString(Weather.Condition) == "Flurries" && UniStormSystem.weatherForecaster != 2)
    54.         {
    55.             UniStormSystem.weatherForecaster = 2;
    56.         }
    57.         if (System.Convert.ToString(Weather.Condition) == "Fog" && UniStormSystem.weatherForecaster != 1)
    58.         {
    59.             UniStormSystem.weatherForecaster = 1;
    60.         }
    61.         if (System.Convert.ToString(Weather.Condition) == "Hazy" && UniStormSystem.weatherForecaster != 1)
    62.         {
    63.             UniStormSystem.weatherForecaster = 1;
    64.         }
    65.         if (System.Convert.ToString(Weather.Condition) == "MostlyCloudy" && UniStormSystem.weatherForecaster != 11)
    66.         {
    67.             UniStormSystem.weatherForecaster = 11;
    68.         }
    69.         if (System.Convert.ToString(Weather.Condition) == "MostlySunny" && UniStormSystem.weatherForecaster != 7)
    70.         {
    71.             UniStormSystem.weatherForecaster = 7;
    72.         }
    73.         if (System.Convert.ToString(Weather.Condition) == "PartlyCloudy" && UniStormSystem.weatherForecaster != 5)
    74.         {
    75.             UniStormSystem.weatherForecaster = 5; // REMECOMENDED 4 FOR SOME REASON
    76.         }
    77.         if (System.Convert.ToString(Weather.Condition) == "PartlySunny" && UniStormSystem.weatherForecaster != 12)
    78.         {
    79.             UniStormSystem.weatherForecaster = 12;
    80.         }
    81.         if (System.Convert.ToString(Weather.Condition) == "Rain" && UniStormSystem.weatherForecaster != 12)
    82.         {
    83.             UniStormSystem.weatherForecaster = 12;
    84.         }
    85.         if (System.Convert.ToString(Weather.Condition) == "Sleet" && UniStormSystem.weatherForecaster != 2)
    86.         {
    87.             UniStormSystem.weatherForecaster = 2;
    88.         }
    89.         if (System.Convert.ToString(Weather.Condition) == "Snow" && UniStormSystem.weatherForecaster != 3)
    90.         {
    91.             UniStormSystem.weatherForecaster = 3;
    92.         }
    93.         if (System.Convert.ToString(Weather.Condition) == "Sunny" && UniStormSystem.weatherForecaster != 8)
    94.         {
    95.             UniStormSystem.weatherForecaster = 8;
    96.         }
    97.         if (System.Convert.ToString(Weather.Condition) == "ThunderStorms" && UniStormSystem.weatherForecaster != 3)
    98.         {
    99.             UniStormSystem.weatherForecaster = 3;
    100.         }
    101.         UniStormSystem.temperature = System.Convert.ToInt16(Weather.TemperatureF);
    102.     }
    103. }
     
  27. Snownebula

    Snownebula

    Joined:
    Nov 29, 2013
    Posts:
    174
    Hmm, how do I combine this with MapMagic?
     
  28. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    Just open your Map Magic scene, use the Auto Player Setup system with your character (Shift+Ctrl+H), and setup your character. Make sure there are no other directional lights in the scene.
     
  29. SSL7

    SSL7

    Joined:
    Mar 23, 2016
    Posts:
    347
    Just wanted to remind about the MapMagic with CTS and Unistorm sliders not working correctly, and ask if you have any update?

    also, anyway we have more robust clouds? I have it on 100% in cloud options, but still not many clouds even on mostly cloudy. I see some packages like this one: https://www.assetstore.unity3d.com/en/#!/content/4027 and would like to know if its possible I can integrate it to unistorm
     
    Last edited: Sep 14, 2017
  30. Snownebula

    Snownebula

    Joined:
    Nov 29, 2013
    Posts:
    174
    How do I combine MapMagic with Voxeland and Unistorm?
     
  31. Alex3333

    Alex3333

    Joined:
    Dec 29, 2014
    Posts:
    342
    Good afternoon. my question is this. When I turn on the weather, the fog. I have a tick in the unity editor. BUT this fog does not work in deferred lighting. I attached a global fog script to the player's camera. how can I make sure that when the foggy weather turns on, then this script is included on the camera and not in the editor unity.
     
  32. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    All you have to do on UniStorm's end is setup your player in the scene with your player and its camera. It's the same process as this video, but with your own player and camera.



    In order to use fog with the newer versions of Unity while using deferred lighting, you have to use Unity's new Post-Processing Stack asset. Global Fog no longer works in the newer versions of Unity. The Post-Processing Stack asset can be found here: https://www.assetstore.unity3d.com/en/#!/content/83912
     
  33. imump

    imump

    Joined:
    Jul 3, 2011
    Posts:
    55
    So BHS...when are volumetric clouds coming? :p
     
  34. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    Volumetric clouds won't be coming to UniStorm, at least anytime soon. This is because they are more specifically for games where the camera will be flying through the clouds and can impact performance quite a bit. However, there will be support for volumetric cloud plugins.

    I am working on a new procedural cloud shader and it's a huge improvement to the current cloud shader. I'll give more details regarding this in a couple of days :)
     
  35. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
  36. RAZD112

    RAZD112

    Joined:
    Aug 30, 2017
    Posts:
    70
    How do I get the weather to change
    It's always sunny . Without winter or fall or something else . No matter how much time I'm in the game .
     
  37. Alex3333

    Alex3333

    Joined:
    Dec 29, 2014
    Posts:
    342
    In order to use fog with the newer versions of Unity while using deferred lighting, you have to use Unity's new Post-Processing Stack asset. Global Fog no longer works in the newer versions of Unity. The Post-Processing Stack asset can be found here: https://www.assetstore.unity3d.com/ru/#!/content/83912 [/ QUOTE]


    I understood it. BUT, you have in the system in the fog settings there is an option that includes automatically fog. And this fog is in the window editor's settings. which does not work.
     
  38. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    When weather is generated, it assigned an hour. So, the weather will change when the generated hour is reached. This goes for all weather. Precipitation weather is determined by your precipitation odds. The higher the odds, the higher the chance of generating a precipitation weather type.


    If I'm understanding correctly, you should be able to disable Automatic Fog by unchecking Automatic Fog. Are you saying that the Fog is still automatically enabled even though it's unchecked?
     
  39. Snownebula

    Snownebula

    Joined:
    Nov 29, 2013
    Posts:
    174
    How to I turn off the U button in this? For some reason when I press the U key a thing pops up. I want to disable that.



    --------------------------------------------------------------

    It took me a few hours but I figured it out.

    Comment out the lines from 1217 to 1231 in the script UniStormWeatherSystem_C.cs
     
    Last edited: Sep 18, 2017
  40. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    Hey there!

    You don't need to comment out anything. You can enabled or disable this setting via the UI controls located under the Object Options.
     
  41. holodevice

    holodevice

    Joined:
    May 29, 2017
    Posts:
    28
    Unistorm Mobile: The rain/snow/thunderstorm/heavy rain are not working. Created a new project, downloaded the asset. Tested with the demo scene. They do not work.
     
  42. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    Hey there!

    Strange, I'll look into this to see if I can figure out what's causing this issue.

    If you could answer these questions, it would help me better understands what's going on.

    What version of Unity are you using?
    What version of UniStorm are you using?
    Are you receiving any errors?
     
  43. holodevice

    holodevice

    Joined:
    May 29, 2017
    Posts:
    28
    version is 2017...
    It is working with the suggested changes in the unistormWeatherMobil.. C script. replaced UNITY_5*** with UNITY_5_OR_NEWER....
     
  44. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    Great to hear!

    I'll get an update submitted to fix this when I get the chance.
     
  45. SSL7

    SSL7

    Joined:
    Mar 23, 2016
    Posts:
    347
    hello @BHS any update on running the CTS weather manager with the new world API ? thank you
     
    Last edited: Sep 28, 2017
  46. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    851
    I seem to recall a blue sky in the editor view before play, but now its a black sky with a few white clouds. Is this normal? It looks great during play.
     
  47. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    Hey there!

    World API support is coming soon. I have a big updated planned that will have new fully procedural clouds, a new biome system, fixes, and more.


    This sounds like the button to toggle the sky in the Unity Editor isn't checked. Making sure this is enabled should allow you to see the blue sky.

    UniStormEditorSky.png
     
    wood333 likes this.
  48. SSL7

    SSL7

    Joined:
    Mar 23, 2016
    Posts:
    347
    Awesome!!! Cannot wait for it :) any ETA?
     
  49. RAZD112

    RAZD112

    Joined:
    Aug 30, 2017
    Posts:
    70
    hey , does somebody know how to integrate aquas with unistorm ? thanks
     
  50. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    Hopefully within the month of October.


    I'll contact the developer of it to see if we can figure out how to do so. My guess would be to control Aquas' colors with UniStorm's color, such as the fog color, for each time of day.