# TaskComponent

A node component that performs continuous processing.
It is used for waiting for time to pass, tween processing, waiting for asynchronous processing to complete, etc.

## Behavior when set to node

### Task

Task

It starts executing when it becomes active, and transitions to the connection destination port when the TaskComponent completes execution.

Additional properties

Property name | Type | Description
--- | --- | ---
Result | `OutputDataPort<bool>` | Outputs the execution result in bool type.

### State

State

Starts execution when it becomes active, and outputs the result as a signal when the TaskComponent completes execution.

Additional properties

Property name | Type | Description
--- | --- | ---
Completed | `OutputSignalPort` | Outputs the execution result as a signal.

### BehaviorTree

BehaviorTree

#### Main

It starts executing when it becomes active and returns the result to the parent node when the TaskComponent completes execution.

#### Services

Starts execution when it becomes active.

Additional properties

Property name | Type | Description
--- | --- | ---
Repeat | `InputField<bool>` | Set whether to repeat after execution is completed.
Status | `OutputDataPort<TaskStatus>` | Outputs the execution status.

### Signal Evaluation

Signal Evaluation

It becomes active when the judgment result of the input signal is true, and the result is reflected in the output signal when the TaskComponent completes execution.

### Event

Event

It will start executing when it becomes active, and will execute the connected node when the TaskComponent has completed execution.

Additional properties

Property name | Type | Description
--- | --- | ---
Repeat | `InputField<bool>` | Sets whether to repeat after execution is complete.

### Service

Event

It will start running when it becomes active.

Additional properties

プロパティ名 | 型 | 説明
--- | --- | ---
Repeat | `InputField<bool>` | Sets whether to repeat after execution is complete.
Status | `OutputDataPort<TaskStatus>` | Outputs the execution status.

## Script generation

The script generation function uses TaskComponent for the following member access scripts.

- Tween field values
- Tween property values
- Calling awaitable methods

For details, see Script generation.