V-Sekai / unidot_importer

Import .unitypackage and other assets designed for Unity Engine as a GDScript addon for vanilla Godot 4.x
MIT License
667 stars 28 forks source link

Unable to load addon script from path, this might be due to a code error in that script. #30

Closed ArchooD2 closed 10 months ago

ArchooD2 commented 10 months ago

Currently attempting to load this addon and getting a warning of:

Unable to load addon script from path: 'res://addons/unidot/plugin.gd'. This might be due to a code error in that script. Disabling the addon at 'res://addons/unidot/plugin.cfg' to prevent further errors.

I made an fgx2gltf install, and I found a closing parenthesis that might've caused an error, but neither ended up fixed the error and I don't know what else to try. I'm running Godot 4.1.1-stable for Windows. Hope that I gave enough info, please let me know what to try!

ArchooD2 commented 10 months ago

Found the issue:

Ln 53: var nod = get_editor_interface().get_selection().get_selected_nodes()[0] as AnimationMixer Could not find type AnimationMixer in the current scope.

Makes much more sense, but not sure how to fix it.

lyuma commented 10 months ago

OMG that's what I get for coding on 4.2 beta, since 4.2 unifies AnimationTree and AnimationPlayer into a common abstract base class. removing the type annotation should fix it. (You can even comment out the whole functiom body and add pass since that function is just for debugging)