How we made our 2D Dynamic Sky System
We are a team of programmers so making a lot of art is a distant dream for us. In order to get variation in the game, we decided to create a dynamic sky system which will affect the color of the background and will also have a subtle effect on actual game elements.
Our solution is based on the following main points:
Manipulate Unity's built in RenderSettings.ambientColor and RenderSettings.fogColor through gradients
A Sky shader which takes in three colors - Top Color, Mid Color and Bottom Color. These three colors are also manipulated through gradients
A rotating skybox consisting of the Sun, Moon, Stars.
Since Unity's ambientColor and fogColor affect all materials which use a lit shader, we didn't have to do anything extra for the dynamic lighting.
Also if you use a custom shader, these variables are available in the shader as global variables unity_AmbientSky and unity_FogColor
Below is the screenshot showing the inspector of the component which controls the sky system