godotengine / godot-docs

Godot Engine official documentation
https://docs.godotengine.org
Other
3.57k stars 2.96k forks source link

C# Global classes & hiding "Editor" class name prefix ambiguity #9537

Open DDoop opened 4 days ago

DDoop commented 4 days ago

Your Godot version: 4.2.2, mono, running on MX Linux.

Issue description: I'm designing a board game map editor (not a godot editor extension, but software I will run separately). I named a class EditorMapTile with the [GlobalClass] attribute so I could find it in the Godot editor's lists (script filename also matches). From what I can tell, Godot is checking my global class names first and hiding the ones that start with Editor in the Editor itself. I made a simple DummyClass inheriting from Node, and that appeared in the node picker list. Renaming EditorMapTile to MyEditorMapTile makes it appear in the list. This took me some time to figure out and was more than a little frustrating/surprising.

Is it documented elsewhere and I missed it?

URL to the documentation page (if already existing): C# Global Classes

AThousandShips commented 4 days ago

This is intentional, and the issue would be documenting that it is a thing and the prefix hides them

AThousandShips commented 4 days ago

See:

DDoop commented 4 days ago

Thank you for replying and finding the duplicate. I should have searched a little harder! I will reply to that issue with the relevant pages in the documentation and my suggested disclaimer language.