bitbrain / beehave

🐝 behavior tree AI for Godot Engine
https://bitbra.in/beehave
MIT License
1.85k stars 116 forks source link

After editing script to extend a Beehave node the scene tree does not update the icon #305

Closed RcubDev closed 7 months ago

RcubDev commented 7 months ago

Godot version: Godot Mono v4.2.1

Describe the bug After editing script to extend a Beehave node the scene tree does not update the icon

To Reproduce Steps to reproduce the behavior:

  1. Create new scene
  2. Attach script to the node
  3. extend any of the beehave classes
  4. The scene tree does not update

Expected behavior When editing a script to extend a Beehave node the scene tree's icon reflects after saving. It is not until you reload the scene that the icon takes.

Screenshots image

bitbrain commented 7 months ago

I suspect this must be a Godot bug - nothing to do with Beehave itself. Can you reproduce this with non-beehave nodes, too? @RcubDev

RcubDev commented 7 months ago

I think you're right this does occur inside the editor with normal nodes. I think it presents itself as worse because of the workflow for the plugin. I add an ActionLeaf to the scene tree and it automatically adds its internal script to the node (unlike godot's default nodes). So I have to detach the script and re-add the script to add my own implementation of the ActionLeaf. I think if that workflow is fixed this is not as much of an issue.

"The only way to add a scriptless custom class is via C++ module or GDExtension." This is an old reddit thread so maybe something is different now:

https://www.reddit.com/r/godot/comments/zo0hyj/make_custom_nodetypes_less_scriptlike/

But it sounds like with the beehave 3.0 coming the workflow issue would be fixed