فهرست منبع

Included note about requirement for class_name for a resource to show… (#10838)

* Included note about requirement for class_name for a resource to show up in create resource GUI
j4d3blooded 3 ماه پیش
والد
کامیت
fb1f3c8377
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      tutorials/scripting/resources.rst

+ 2 - 2
tutorials/scripting/resources.rst

@@ -209,11 +209,11 @@ Without a script, it's useless, so let's add some data and logic!
 Attach a script to it named ``bot_stats.gd`` (or just create a new script, and then drag it to it).
 Attach a script to it named ``bot_stats.gd`` (or just create a new script, and then drag it to it).
 
 
 .. note::
 .. note::
-    If you're using C#, you need to annotate your Resource class with the ``[GlobalClass]`` attribute for it to show up in the create resource GUI.
+    To make the new resource class appear in the Create Resource GUI you need to provide a class name for GDScript, or use the [GlobalClass] attribute in C#.
 
 
 .. tabs::
 .. tabs::
   .. code-tab:: gdscript GDScript
   .. code-tab:: gdscript GDScript
-
+    class_name BotStats
     extends Resource
     extends Resource
 
 
     @export var health: int
     @export var health: int