public sealed class TimeSlicedExecutionController : ExecutionController
An Exeuction Controller which tries to limit the amount of time the component that
uses it exeucutes for
in a given frame. ShouldStartExecuting will always return true and therefore this
controller does not
ever stop the component from beginning execution.
If using multiple Worlds at the same time, each World must use a different instance
of the Execution Controller!
Name | Type | Description |
---|---|---|
TimeSlice | double |
The amount of time (in seconds) that the component that uses this execution controller can execute for (not guaranteed). |
public override bool ShouldContinueExecuting()
When the component which uses the execution controller 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).
bool
Returns true when the total time the Current frame has executed for is less than
TimeSlice.
public override 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.
bool
Always returns true.