teebarjunk / godot-4.0-tool_button

Ease development with an inspector button that's plumb simple.
MIT License
55 stars 7 forks source link

Invalid call when adding a script to StaticBody3D [Godot4 Beta10] #4

Open solorvox opened 1 year ago

solorvox commented 1 year ago

Godot v4.0.beta10.official [d0398f62f]

Error:

res://addons/tool_button/TB_InspectorPlugin.gd:43 - Invalid call. Nonexistent function '_get_tool_buttons' in base 'StaticBody3D ()'.
res://addons/tool_button/TB_InspectorPlugin.gd:85 - Invalid call. Nonexistent function 'new' in base 'GDScript'.

Script:

@tool
extends StaticBody3D

func _get_tool_buttons():
    return ["set_materials"]

func set_materials() -> void:
    print("Set materials")
notwarp commented 1 year ago

I've replicated your issue, and if you detach and reattach your script to your node, the issue disappear. I think there is something behind the scene in the core of the engine that block the expected behaviour of the plugin