Skip to content

FlowPilotParent.h

File Info

FileName: FlowPilotParent.h

UFlowPilotParent

Parent Classes: [ UFlowPilotTask ]

Base class that contains an array of Tasks

  • Implements base functionality to query, add, remove tasks, etc.. Inherited by Tasks that handle multiple Tasks.

Properties

// Tasks this Parent Task handles
UPROPERTY(EditDefaultsOnly, Instanced, Category="FlowPilot")
TArray<TObjectPtr<UFlowPilotTask>> Tasks;

Functions

SetTasks

Set Initial set of tasks

void SetTasks(const TArray<TObjectPtr<UFlowPilotTask>>& InTasks);

AddTask

Adds a new task

bool AddTask(const TObjectPtr<UFlowPilotTask>& InTask);

RemoveTask

Removes a task

bool RemoveTask(const TObjectPtr<UFlowPilotTask>& InTask);

HasTask

Returns true if InTask is contained in Tasks

bool HasTask(const TObjectPtr<UFlowPilotTask>& InTask) const;

GetTaskCount

Returns number of Tasks

int32 GetTaskCount() const { return Tasks.Num(); }

GetTasks

Returns const array of Tasks

const TArray<TObjectPtr<UFlowPilotTask>>& GetTasks() const;

GetTasksMutable

Returns mutable array of Tasks

TArray<TObjectPtr<UFlowPilotTask>>& GetTasksMutable();