Unity: Creating a day-night cycle

In some games, it is useful to have a day and night cycle. For example, In Mystery Queen, the creatures of the world behave differently depending on the time of day, e.g., Slimey is only active when the sun is up, and goes to sleep at dusk.

Slimey goes to sleep when the sun sets.

In this guide, I’ll discuss how to create a day-night cycle with the lighting system in Unity 2D, so that you can incorporate similar systems in your game! Similar to…