This project was part of a R&D assignment in the Gameplay Engineering semester I did in H1 of 2025. It explores the concept of taking Real-Time Data (RTD) for an expandable weather system to enhance the visuals of a unity project.
Check out the full R&D article here.
Many games use weather systems to enhance their visual experience. This is typically done with particle systems placed in the scene, along with custom effects that simulate rain, fog, and other atmospheric conditions. However, these effects are usually static. That made me wonder: wouldn’t it be cool to have a system that reads the player’s real-world location, or any chosen location, and applies the corresponding weather effects in-game? Combined with events that only occur under specific weather conditions, this could create a unique experience for every playthrough, changing dynamically with the weather of the day.
This weather system uses UnityWebRequest in combination with the WeatherAPI.com service. It retrieves data such as location, local time, temperature, and current weather conditions. That information is then used to adjust the sun’s rotation to reflect real-world time and to trigger specific weather effects based on keywords, configured in the Unity Inspector, that match the API’s output. By default, the system uses the player’s IP address to determine their location at startup, automatically applying the corresponding weather conditions. This location can be changed dynamically at runtime, through a text input or other methods, to switch between different weather settings. The system also makes periodic API calls every few minutes to keep the in-game weather aligned with real-world conditions.