ExecutionController Class

public abstract class ExecutionController : MonoBehaviour, IExecutionController

A component based Execution Controller, which is resposible for controlling the execution of SAM related code.

You can create a custom class that derives from this one in order to create custom logic for dictating when exeuction occurs.

Methods

ShouldContinueExecuting()

public abstract bool ShouldContinueExecuting()

When the component which uses the IExecutionController wants to know whether it should yield for a frame or continue executing, this method is queried.

Note there are a lot of methods that don't use this strategy, but instead need to always yield for a frame or on some other property (WaitForSeconds for example)

Returns

bool
Return true if the component should continue executing, false if it should yield for a frame.


ShouldStartExecuting()

public abstract bool ShouldStartExecuting()

For every frame that the component which uses this execution controller is set to execute, this method will be queried to determine whether the component should execute.

A typical use case would be not letting the component execute if x seconds have already transpired during the frame.

Returns

bool
Return true if the component should start executing its logic in the Current frame, or false if it should not (the next frame this method will be queried again).