Skip to content

@tool YggdrasilBuilder API

Builder for configuring and creating a YggdrasilTreeView from a YggdrasilTree.


Properties

Type Name Default
YggdrasilTree _tree null
YggdrasilTreeView _tree_view null
Node _parent null
PackedScene _decoration_scene null
PackedScene _node_scene null
PackedScene _line_scene null
PackedScene _tooltip_scene null
Callable _tree_version_mismatch_callback Callable()
Callable _decoration_created_callback Callable()
Callable _node_created_callback Callable()
Callable _node_allocated_callback Callable()
Callable _node_deallocated_callback Callable()
Callable _prefab_created_callback Callable()
Callable _line_created_callback Callable()
Callable _preallocation_check_callback Callable()
Callable _allocation_check_callback Callable()
Callable _deallocation_check_callback Callable()
Callable _node_refund_check_callback Callable()

Methods

Type Name
YggdrasilBuilder set_parent(parent: Node)
YggdrasilBuilder set_decoration_scene(decoration_scene: PackedScene)
YggdrasilBuilder set_node_scene(node_scene: PackedScene)
YggdrasilBuilder set_line_scene(line_scene: PackedScene)
YggdrasilBuilder set_tooltip_scene(tooltip_scene: PackedScene)
YggdrasilBuilder tree_version_mismatch_callback(callback: Callable)
YggdrasilBuilder decoration_created_callback(callback: Callable)
YggdrasilBuilder node_created_callback(callback: Callable)
YggdrasilBuilder node_allocated_callback(callback: Callable)
YggdrasilBuilder node_deallocated_callback(callback: Callable)
YggdrasilBuilder prefab_created_callback(callback: Callable)
YggdrasilBuilder line_created_callback(callback: Callable)
YggdrasilBuilder preallocation_check_callback(callback: Callable)
YggdrasilBuilder allocation_check_callback(callback: Callable)
YggdrasilBuilder deallocation_check_callback(callback: Callable)
YggdrasilBuilder node_refund_check_callback(callback: Callable)
YggdrasilTreeView build()

Property Descriptions

YggdrasilTree _tree = null

Tree resource used to build the tree view.

YggdrasilTreeView _tree_view = null

Tree view instance created by the builder.

Node _parent = null

Parent node that receives the built tree view.

PackedScene _decoration_scene = null

Scene used for created decorations.

PackedScene _node_scene = null

Scene used for created nodes.

PackedScene _line_scene = null

Scene used for created lines.

PackedScene _tooltip_scene = null

Scene used for created tooltips.

Callable _tree_version_mismatch_callback = Callable()

Callback connected to tree_version_mismatch.

Callable _decoration_created_callback = Callable()

Callback connected to decoration_created.

Callable _node_created_callback = Callable()

Callback connected to node_created.

Callable _node_allocated_callback = Callable()

Callback connected to node_allocated.

Callable _node_deallocated_callback = Callable()

Callback connected to node_deallocated.

Callable _prefab_created_callback = Callable()

Callback connected to prefab_created.

Callable _line_created_callback = Callable()

Callback connected to line_created.

Callable _preallocation_check_callback = Callable()

Callback assigned to allocation service preallocation checks.

Callable _allocation_check_callback = Callable()

Callback assigned to allocation service allocation checks.

Callable _deallocation_check_callback = Callable()

Callback assigned to allocation service deallocation checks.

Callable _node_refund_check_callback = Callable()

Callback assigned to allocation service refund checks.

Method Descriptions

YggdrasilBuilder set_parent(parent: Node)

Sets the parent node that will receive the built tree view and returns the builder.

YggdrasilBuilder set_decoration_scene(decoration_scene: PackedScene)

Sets the scene used for created decorations and returns the builder.

YggdrasilBuilder set_node_scene(node_scene: PackedScene)

Sets the scene used for created nodes and returns the builder.

YggdrasilBuilder set_line_scene(line_scene: PackedScene)

Sets the scene used for created lines and returns the builder.

YggdrasilBuilder set_tooltip_scene(tooltip_scene: PackedScene)

Sets the scene used for created tooltips and returns the builder.

YggdrasilBuilder tree_version_mismatch_callback(callback: Callable)

Sets the callback connected to tree_version_mismatch and returns the builder.

YggdrasilBuilder decoration_created_callback(callback: Callable)

Sets the callback connected to decoration_created and returns the builder.

YggdrasilBuilder node_created_callback(callback: Callable)

Sets the callback connected to node_created and returns the builder.

YggdrasilBuilder node_allocated_callback(callback: Callable)

Sets the callback connected to node_allocated and returns the builder.

YggdrasilBuilder node_deallocated_callback(callback: Callable)

Sets the callback connected to node_deallocated and returns the builder.

YggdrasilBuilder prefab_created_callback(callback: Callable)

Sets the callback connected to prefab_created and returns the builder.

YggdrasilBuilder line_created_callback(callback: Callable)

Sets the callback connected to line_created and returns the builder.

YggdrasilBuilder preallocation_check_callback(callback: Callable)

Sets the callback assigned to allocation service preallocation checks and returns the builder.

YggdrasilBuilder allocation_check_callback(callback: Callable)

Sets the callback assigned to allocation service allocation checks and returns the builder.

YggdrasilBuilder deallocation_check_callback(callback: Callable)

Sets the callback assigned to allocation service deallocation checks and returns the builder.

YggdrasilBuilder node_refund_check_callback(callback: Callable)

Sets the callback assigned to allocation service refund checks and returns the builder.

YggdrasilTreeView build()

Creates a tree view, connects configured callbacks, adds the tree view to the parent, loads runtime tree state outside the editor, initializes the tree view, applies allocation callbacks, and returns the built tree view.