Skip to content

ProcessComponent

Runs an IProcess lifecycle driven by begin/end triggers.

Namespace: Jungle.Processes
Inherits: ControllableComponent → MonoBehaviour

Overview

ProcessComponent manages an IProcess through its full lifecycle — begin and end — using triggers inherited from ControllableComponent. When the begin trigger fires, the configured process starts. When the end trigger fires (or stop conditions are met), the process completes or is interrupted based on the StopBehavior setting. Supports retrigger policies for handling overlapping activations.

Properties

Property Type Description
process IProcess The process to run when triggered.
StopBehavior StopBehavior What happens when the process is stopped (Complete or Interrupt).
RetriggerStrategy ProcessRetriggerStrategy What happens when begin fires while a run is still live (Ignore / CompleteAndRestart / Buffer / TogglePause / Parallel). By default the strategy only affects runs about the same subject.

Public API

Begin/end are inherited from ControllableComponent: call Begin() to start the process and End() to stop it. Which trigger drives Begin/End is controlled by the executionFrame field (default: MonoLifecycleFrame(EnableDisable)).

Property Type Description
IsRunning bool True while the process is running.
IsEnding bool True while the process is completing after an End call.
RunCompleted event Action Raised when every running step has finished on its own, without being stopped early.
EndCompleted event Action Raised after the component has been told to end and every step has finished completing.
Enum Values Behavior
StopBehavior Complete / Pause Complete runs the process to its natural end pose; Pause freezes progress so it can pick up again later.
ProcessRetriggerStrategy Parallel / CompleteAndRestart / Complete / Restart / TogglePause / Ignore / Buffer Shared with BeginRun -- one retrigger policy for the whole execution stack, applied at the entry point. Scoped per subject by default (RetriggerScope.SameSubject).

See Also