One Logo Pool Ball
RealityFoundation · IOS API REFERENCE

BehaviorTreeComponent

struct · iOS 27.0+ · SDK 27.1

struct BehaviorTreeComponent

Manages which behavior tree is active for the component's entity.

Members (5)

init · iOS 27.0+

init

TypeScript
static init(behaviorTree: (BehaviorTreeResource) | null, availableBehaviorTrees: Record<string, BehaviorTreeResource>): BehaviorTreeComponent
Swift declaration
init(behaviorTree: BehaviorTreeResource?, availableBehaviorTrees: [String : BehaviorTreeResource])
get · iOS 27.0+

behaviorTree

TypeScript
get behaviorTree(): (BehaviorTreeResource) | null
Swift declaration
var behaviorTree: BehaviorTreeResource? { get set }

Accesses the current behavior tree. Note that setting the behavior tree to a tree not in `availableBehaviorTrees` will add a uniquely-named entry for the tree in `availableBehaviorTrees`.

set · iOS 27.0+

behaviorTree

TypeScript
set behaviorTree(value: (BehaviorTreeResource) | null)
Swift declaration
var behaviorTree: BehaviorTreeResource? { get set }

Accesses the current behavior tree. Note that setting the behavior tree to a tree not in `availableBehaviorTrees` will add a uniquely-named entry for the tree in `availableBehaviorTrees`.

get · iOS 27.0+

availableBehaviorTrees

TypeScript
get availableBehaviorTrees(): Record<string, BehaviorTreeResource>
Swift declaration
var availableBehaviorTrees: [String : BehaviorTreeResource] { get set }

All the behavior trees that this component can access.

set · iOS 27.0+

availableBehaviorTrees

TypeScript
set availableBehaviorTrees(value: Record<string, BehaviorTreeResource>)
Swift declaration
var availableBehaviorTrees: [String : BehaviorTreeResource] { get set }

All the behavior trees that this component can access.

Skipped declarations

No declarations were skipped in this snapshot.

All RealityFoundation types →