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

is_plugin_enabled() not working as stated in the docs #61604

Closed
KoBeWi opened this issue Jun 1, 2022 · 1 comment · Fixed by #61820
Closed

is_plugin_enabled() not working as stated in the docs #61604

KoBeWi opened this issue Jun 1, 2022 · 1 comment · Fixed by #61820

Comments

@KoBeWi
Copy link
Member

KoBeWi commented Jun 1, 2022

Godot version

4.0 0810b0d / 3.5

System information

Windows 10 x64

Issue description

Regression from #43734

is_plugin_enabled() description says:

Returns true if the specified plugin is enabled. The plugin name is the same as its directory name.

but in fact it takes full path to cfg file, i.e. res://addons/myplugin/plugin.cfg instead of myplugin.

Either the docs need update or the method should be changed to use plugin dirs (which might be difficult).

Steps to reproduce

  1. Enable addon
  2. Try calling is_plugin_enabled() following the description in the docs
  3. It will return false

Minimal reproduction project

No response

@pfertyk
Copy link
Contributor

pfertyk commented Jun 8, 2022

I'd like to submit a solution. I've enabled the is_addon_plugin_enabled (called by is_plugin_enabled) to work with both names and full paths. If necessary, I think I can make it work with only names, to keep the behavior consistent with the docs ;)

pfertyk added a commit to pfertyk/godot that referenced this issue Jun 9, 2022
@akien-mga akien-mga modified the milestones: 3.5, 4.0 Jun 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants