Skip to content

Commit fb1f3c8

Browse files
authored
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
1 parent f31a4ac commit fb1f3c8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tutorials/scripting/resources.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,11 +209,11 @@ Without a script, it's useless, so let's add some data and logic!
209209
Attach a script to it named ``bot_stats.gd`` (or just create a new script, and then drag it to it).
210210

211211
.. note::
212-
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.
212+
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#.
213213

214214
.. tabs::
215215
.. code-tab:: gdscript GDScript
216-
216+
class_name BotStats
217217
extends Resource
218218

219219
@export var health: int

0 commit comments

Comments
 (0)