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

@export_category conflicts with autoload singletons #82228

Closed
Metalloriff opened this issue Sep 24, 2023 · 2 comments
Closed

@export_category conflicts with autoload singletons #82228

Metalloriff opened this issue Sep 24, 2023 · 2 comments

Comments

@Metalloriff
Copy link

Godot version

v4.1.1.stable.official [bd6af8e]

System information

Godot v4.1.1.stable - Windows 10.0.22621 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3060 Ti (NVIDIA; 31.0.15.3713) - AMD Ryzen 7 3700X 8-Core Processor (16 Threads)

Issue description

This isn't a massive issue, but caused a few hours of confusion for me.

I have an autoload singleton named "Network", and I'm accessing it in my player script. After organizing my code a bit with @export_category, I created a category named "Network", and was getting "Invalid get index 'blah' (on base: 'Nil')."

It seems that creating an export category creates some sort of nil variable that conflicts with singletons (or maybe existing variables in general).

Steps to reproduce

  1. Create an autoload singleton
  2. On any scene, create a script
  3. In that script, create an export category with the same title as the singleton name
  4. Attempt to access the singleton

Minimal reproduction project

N/A

@dalexeev
Copy link
Member

Thanks for reporting the bug nonetheless!

@dalexeev dalexeev closed this as not planned Won't fix, can't repro, duplicate, stale Sep 24, 2023
@Metalloriff
Copy link
Author

Thanks for reporting the bug nonetheless!

Sorry about that! It was late and I didn't think to check existing issues. My first time making an issue. I'll check beforehand in the future!

Thanks for the quick response

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

No branches or pull requests

2 participants