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

Custom class "Editor" can't be added to scene using "Create New Node" dialog. #88601

Open
ghmart opened this issue Feb 20, 2024 · 5 comments · May be fixed by #90765
Open

Custom class "Editor" can't be added to scene using "Create New Node" dialog. #88601

ghmart opened this issue Feb 20, 2024 · 5 comments · May be fixed by #90765

Comments

@ghmart
Copy link

ghmart commented Feb 20, 2024

Tested versions

  • Reproducible in: 3.4.4-stable, 3.5.3-stable, v4.2.1-stable, 4.3-dev3...

System information

Godot v4.2.1.stable - Debian GNU/Linux 11 (bullseye) 11 - X11 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3060 Ti () - 11th Gen Intel(R) Core(TM) i5-11600K @ 3.90GHz (12 Threads)

Issue description

Custom class "Editor" can't be created using "Create New Node" dialog.
Can be created in GDScript. Autocomplete works.

class_name_editor

P.S. The same on Windows.

Steps to reproduce

  1. Create custom class "Editor" using "class_name Editor extends Control".
  2. Save.
  3. Add new scene.
  4. Try to add node "Editor" using "Create New Node" dialog.

Minimal reproduction project (MRP)

N/A

@AThousandShips
Copy link
Member

AThousandShips commented Feb 20, 2024

This is because that dialog filters out nodes starting with Editor as there are many internal nodes named that, this could probably be made a little more specific, will look into it, however you would still be unable to create nodes prefixed with that

It's trivial to "fix", but it's not necessarily all that important, unless we also make some further changes to allow nodes prefixed with Editor to be added, as long as they're not engine types, possibly

@ghmart
Copy link
Author

ghmart commented Feb 20, 2024

Thank you for explanation.
Sure. Not really that important since a strong reason behind.

@AThousandShips
Copy link
Member

What we could do is add a warning some places perhaps

@ghmart
Copy link
Author

ghmart commented Feb 20, 2024

Yeah, maybe that would be helpful for someone one day.

@DDoop
Copy link

DDoop commented Jun 24, 2024

Pages that need updating:
GDScript Basics, class_name section
C# global classes.

Both would benefit from a warning box with the following text or similar (near the bottom would suffice, any disclosure beats none):
Note that the Godot editor will not show these kinds of custom classes in the 'Create New Node' or 'Create New Scene' dialog windows if their names begin with the "Editor" prefix. The classes are available for instantiation at runtime via their class names, but are automatically hidden by the editor windows along with the built-in editor nodes used by the Godot editor.

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