Class ProceduralActionScheduler
Owns one animator's procedural action lifecycle: which actions it can run, which are running right now, their per-animator runtime state, and the cooldown gates that decide when one may start again.
Inherited Members
Namespace: Serenity.ProceduralAnimator.Infrastructure.Services
Assembly: Serenity.UnityProceduralAnimator.Infrastructure.dll
Syntax
public sealed class ProceduralActionScheduler
Remarks
Extracted from ProceduralAnimatorComponent. Like the layer weights, every collection here is
per-animator and never lives on the shared ProceduralActionSO assets, which many animators
can trigger independently.
Constructors
ProceduralActionScheduler()
Declaration
public ProceduralActionScheduler()
Methods
Seed(IReadOnlyList<ProceduralActionSO>)
Adopts the resolved configuration as the set of actions this animator can run.
Declaration
public void Seed(IReadOnlyList<ProceduralActionSO> actions)
Parameters
| Type | Name | Description |
|---|---|---|
| IReadOnlyList<ProceduralActionSO> | actions |
StopAll(in UnityProceduralContext)
Stops every running action immediately, without waiting for it to report itself finished.
Declaration
public void StopAll(in UnityProceduralContext ctx)
Parameters
| Type | Name | Description |
|---|---|---|
| UnityProceduralContext | ctx |
Tick(in UnityProceduralContext, ref PoseDelta)
Advances every running action by this frame, writing its contribution into pose,
and retires the ones that report themselves finished.
Declaration
public void Tick(in UnityProceduralContext ctx, ref PoseDelta pose)
Parameters
| Type | Name | Description |
|---|---|---|
| UnityProceduralContext | ctx | |
| PoseDelta | pose |
TryStart(ProceduralActionSO, in UnityProceduralContext, float, bool)
Starts an action if it is one this animator knows, is off cooldown, and reports itself startable.
Declaration
public void TryStart(ProceduralActionSO action, in UnityProceduralContext ctx, float time, bool allowRetrigger)
Parameters
| Type | Name | Description |
|---|---|---|
| ProceduralActionSO | action | |
| UnityProceduralContext | ctx | |
| float | time | |
| bool | allowRetrigger | When the action is already running, whether to stop and restart it rather than leave the current run alone. |