Struct ActionTask
An action task acts as a grouping mechanism for tasks.
Namespace: Unity.Kinematica
Syntax
[Data("Action", "#372A56", DataType.Flag.TopologySort)]
public struct ActionTask : Task
Remarks
Tasks that are created inside of an action task will be automatically arranged in a directed acyclic graph and execute in topological order.
Fields
self
Identifier that represents the instance of this action task.
Declaration
public Identifier<ActionTask> self
Field Value
Type | Description |
---|---|
Identifier<ActionTask> |
Methods
Execute()
Execute method for the action task.
Declaration
public Result Execute()
Returns
Type | Description |
---|---|
Result | Failure if one of the child tasks fails; success if the action task has no children or all tasks have succeeded. |
Implements
Remarks
Action tasks execute its children in topological order until a child task returns a failure status. The action task returns a success status if all children return a success status.
ExecuteSelf(ref TaskRef)
Surrogate method for automatic task execution.
Declaration
public static Result ExecuteSelf(ref TaskRef self)
Parameters
Type | Name | Description |
---|---|---|
TaskRef | self | Task reference that is supposed to be executed. |
Returns
Type | Description |
---|---|
Result | Result of the task execution. |
Operators
Implicit(ActionTask to Identifier<ActionTask>)
Implicit cast operator that allows to convert an action task reference into an typed identifier.
Declaration
public static implicit operator Identifier<ActionTask>(ActionTask task)
Parameters
Type | Name | Description |
---|---|---|
ActionTask | task |
Returns
Type | Description |
---|---|
Identifier<ActionTask> |