Kaira Digital ArtsKaira Digital Arts
Pages (23)Events Module

Events Module

Last updated 6 October 2026

Turns time and weather into UnityEvents you can wire up in the inspector without code: close shops at night, switch street lights on at sunset, start a cutscene at a named hour.

Events

EventFires when
onSecondPassed, onMinutePassed, onHourPassedAn in-game second, minute or hour passes
onDayStarted, onNightStartedThe clock passes the Time Module's day start or night start
onSunrise, onSunsetThe clock passes the sunrise or sunset time
customEventsA named custom time from the Time Module is reached
onWeatherEffectStarted(string)A weather starts. The argument is its name
onWeatherEffectStopped(string)A weather ends
onWeatherChanged(string)The active weather changes

Custom time events

  1. On the Time Module, open Events and press + Add Event. Give it a name and a time.
  2. On the Events Module, add an entry to customEvents with exactly the same name and wire its onTrigger.

Custom events fire once per day. After jumping the clock, ResetAllEventTriggers() clears the once per day flags.

From code

csharp
using KairaDigitalArts;
using UnityEngine;

public class StreetLights : MonoBehaviour
{
    void Start()
    {
        var events = EasyWeatherManager.instance.eventsModule;
        events.onSunset.AddListener(TurnOn);
        events.onSunrise.AddListener(TurnOff);
        events.onWeatherEffectStarted.AddListener(name => Debug.Log(name + " started"));
    }

    void TurnOn()  { /* ... */ }
    void TurnOff() { /* ... */ }
}

Pages that link here

Still stuck?

Send us your Unity version, render pipeline and a screenshot of the problem.

Contact support