teebarjunk / godot-4.0-tool_button

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

Non existent function _get_tool_buttons #9

Open ForestGameDev opened 1 year ago

ForestGameDev commented 1 year ago

Have you tried this in Godot 4.1?

I faced some issues to get it to work, I was getting a bunch of errors like: TB_InspectorPlugin.gd:43 - Invalid call. Nonexistent function '_get_tool_buttons'

Obviously, the method was there, as there is a has_method check before the call. After trying a few things what worked for me was to disable the plugin, remove the script from my object, then enable the plugin, and finally add the script back (or maybe the last two steps were the other war around).

Maybe it's a Godot issue but it would be nice if you could check what causes this.

EDIT. After working a bit more with it, the error shows up again and couldn't find a way to work-around it this time. Even restarting Godot does not help.

EDIT2. Ok, it seems my mistake was changing the type of my Node in the inspector to the Class of my script. Once I moved it back to type Node it started to work again!