godot-4.0-tool_button
godot-4.0-tool_button copied to clipboard
Godot 4.2+ _get_tool_buttons Fix
This addon does not work in godot 4.2+. To fix the code you need to check if the object received by the addon is a GDScript and if so instantiate it to be able to run it's code. "@tool" is not required.
/addons/gd_noise/gd_noise_inspector.gd:37
# buttons defined in _get_tool_buttons show at the top
func _parse_begin(object: Object) -> void:
var inst
if object is GDScript:
inst = object.new()
else:
inst = object
if not inst.has_method("_get_tool_buttons"):
return
for method in inst._get_tool_buttons():
add_custom_control(InspectorToolButton.new(inst, method, pluginref))