Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Unable to load addon script from path" when working with Version control #184

Open
RetroSpecter opened this issue Jan 2, 2024 · 5 comments

Comments

@RetroSpecter
Copy link

RetroSpecter commented Jan 2, 2024

When initially setting up the fmod addon, things seem to work smoothly. However, if I hop to a separate branch and come back to it, or hop to the branch from a separate screen, I end up with the following popup, and am unable to re-enable the addon from the plugins menu:

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

It seems to fix itself if I reimport the addon, however that isn't a very viable solution.

Currently on Godot 4.2.0 mono (granted a custom build for Spine2D, but I don't think that would cause the issue).

@RetroSpecter
Copy link
Author

RetroSpecter commented Jan 3, 2024

So I did more investigation, and it looks like it is being caused by the .gitignore included in the fmod folder ignoring certain filetypes in the libs folder.

image

If I readd them, the plugin seems to work again (though of course they don't show up in VC because of the .gitignore).

Curious as to if there was a particular reason they were ignored. Is it leftover from when you couldn't redistribute the fmod libraries?
image

@piiertho
Copy link
Member

piiertho commented Jan 7, 2024

Hello !
Libraries files are not committed in repo to avoid making repo disk size grow up at each fmod update.
If you want to commit them in your repo, you can simply remove libs folder from gitignore.
Maybe we should remove gitignore file when building add-on in CI.

@JackEvans24
Copy link

JackEvans24 commented Aug 23, 2024

Hi, just run into a similar issue here.

The structure of the .gitignore file suggests that the intended behaviour is to ignore those file types outside of the libs directory (using the ! negation). The negation doesn't work as a coverall for a top-level directory, so the actual files you need aren't saved to version control.

I've fixed this in my project by being a bit more specific with the negation:

*.dll
*.a
*.dylib
*.so

!libs/android/arm64
!libs/iOS/
!libs/linux/
!libs/macos/
!libs/windows/

Hope this helps :)

@0-Vanes-0
Copy link

I tried same above but didn't succeed.

It seems to fix itself if I reimport the addon, however that isn't a very viable solution.

I just told my contributor of my repo to delete fmod folder from addons and redownload extension's release with unpacking it at addons once again. It's not such a problem if I have 2-3 programmers in total but yeah.

@CedNaru
Copy link
Member

CedNaru commented Nov 9, 2024

I think the issue is mire likely to be a bug related to Godot itself more than the FMOD plugin itself.
Hopefully, this PR will fix that in the next Godot release:
godotengine/godot#98041

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants