Skip to content

Blackboards count as orphans if created dynamically #127

@Werninator

Description

@Werninator

Godot version: 4.0-rc1

As hinted from #122: It seems like, if a blackboard will be initialized at runtime (when there is no Blackboard assigned), it will count as an orphaned node, as it isn't added to the SceneTree.

I added following to beehave_tree.gd:_ready():

if not blackboard:
    blackboard = Blackboard.new()
    blackboard.name = "Blackboard that has been created at runtime"

print_orphan_nodes()

Output:

Output: 52714014507 - Stray Node: Blackboard that has been created at runtime (Type: Node)

GDUnit4 didn't show me this being an orphan and in general this might not be an issue per se, but it did make me search for why there suddenly was an orphaned node appearing per Instance using a BeehaveTree.

Current workaround is to add a Blackboard and assign it, otherwise you'll have to ignore it. A solution could be to add new Blackboards to the tree.

To Reproduce
Steps to reproduce the behavior:

  1. Add BeehaveTree to the Scene without an assigned Blackboard in it

Expected behavior
No orphaned node

Screenshots
N/A

Desktop (please complete the following information):

  • OS: win11

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐛 bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions