IExecutionController Interface

public interface IExecutionController

Represents an Execution Controller, which is resposible for controlling the execution of SAM related code.

Methods

ShouldContinueExecuting()

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()

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).