Browse Source

Add warnings for classes named "Editor" in GDscript and C# pages, class_name keyword/global class attribute (#9548)

* Added warning about Editor hiding class_names beginning with Editor prefix

---------

Co-authored-by: Max Hilbrunner <[email protected]>
DDoop 11 months ago
parent
commit
e9035f7cf0

+ 9 - 0
tutorials/scripting/c_sharp/c_sharp_global_classes.rst

@@ -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 - 0
tutorials/scripting/gdscript/gdscript_basics.rst

@@ -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
 ^^^^^^^^^^^