Skip to content

Commit

Permalink
Add warnings for classes named "Editor" in GDscript and C# pages, cla…
Browse files Browse the repository at this point in the history
…ss_name keyword/global class attribute (#9548)

* Added warning about Editor hiding class_names beginning with Editor prefix

---------

Co-authored-by: Max Hilbrunner <mhilbrunner@users.noreply.github.com>
  • Loading branch information
DDoop and mhilbrunner authored Aug 14, 2024
1 parent e273520 commit e9035f7
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tutorials/scripting/c_sharp/c_sharp_global_classes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,12 @@ will let you create and load instances of this type easily.
.. image:: img/globalclasses_exportedproperty1.webp

.. image:: img/globalclasses_exportedproperty2.webp

.. warning::

The Godot editor will hide these custom classes with names that beging with the prefix
"Editor" in the 'Create New Node' or 'Create New Scene' dialog windows. 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.

8 changes: 8 additions & 0 deletions tutorials/scripting/gdscript/gdscript_basics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1888,6 +1888,14 @@ If you want to use ``extends`` too, you can keep both on the same line::
and this includes arrays and dictionaries. This is in the spirit of thread safety,
since scripts can be initialized in separate threads without the user knowing.

.. warning::

The Godot editor will hide these custom classes with names that beging with the prefix
"Editor" in the 'Create New Node' or 'Create New Scene' dialog windows. 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.

Inheritance
^^^^^^^^^^^

Expand Down

0 comments on commit e9035f7

Please sign in to comment.