Closed Lking03x closed 2 months ago
Oddly setting the texture directly in the _enter_tree
function works (_ready
is never called!)
addon_control.get_node("TextureRect").texture = AddonUtils.get_first_image_texture()
(get_first_image_texture
use the same code as initialize
but return the texture)
The other gdscript files need to start with @tool
to run in the editor.
Thanks a lot. It also solved the error about "Nonexistent function"
Tested versions
4.2.2 stable
System information
Godot v4.2.2.stable - Windows 10.0.22621 - GLES3 (Compatibility)
Issue description
The add-on instantiate
AddonControl
(which inherits fromControl
) and add it to the dock.AddonControl
define a_ready
andinitialize
function, the first calls the later, in the source.When running the
AddonControl
scene in via (F6) the scene works properly, but running the add-on triggersres://addons/BugIsHere/addon_main.gd:17 - Invalid call. Nonexistent function 'initialize' in base 'Control (AddonControl)'.
The Facts:
.has_method("initialize")
returns true on the instance ofAddonControl
_ready
function seems to not be called at allSee "BUG" comments in the project
Steps to reproduce
Enable the plugin
Minimal reproduction project (MRP)
BugNonExistingMethod.zip