Lifecycle events
See also: Ability stages

In addition to the Ability stages, an ability goes through a number of lifecycle events during it's lifetime.
| Event | When it's raised |
|---|---|
| Initialized | At the end of Start() |
| Used | When CastAbility() is called.This is only raised if the ability was successfully cast and it's lifecycle begins. |
| WarmupStart | When the ability enters the Warmup stage |
| Casting | When the enters the Cast stage |
| CooldownStart | When the ability enters the Cooldown stage. This is raised even if the ability has no cooldown |
| CooldownEnd | When the ability is leaving the Cooldown stage, i.e. it's is finished and ready to be cast again. This is raised in the same frame as CooldownStart if the ability has no cooldown |
| Interrupted | Raised when you call StopCasting on either the Ability or the Invoker |
All of these events, except Initialized, are also raised from the Ability invoker. It has the same timings except that CooldownEnd will fire the next frame if the ability has no cooldown.
If you have no Animations and Timings assigned to the ability, the events will always fire in the same frame.
Subscribing
The lifecycle-events can be subscribed to either by subclassing AbilityLifecycleEventHandlerSO and assigning your instance of it to the corresponding event in the editor, or by directly assigning your own handlers via code.
The code events match the names of the editor.
The code events are raised before the editor-assigned handlers.
SPAM Framework Documentation