From 369c7d2422d4d429618070e13d85b46c0ffbb1ea Mon Sep 17 00:00:00 2001 From: souplamp Date: Fri, 25 Nov 2022 07:21:27 -0600 Subject: Update docs to mention `@icon` only works with global script classes Update the docs to clarify that the `@icon` annotation does not work when only attaching a script to a node, and clarify that the script itself must be a globally accessible script type. --- modules/gdscript/doc_classes/@GDScript.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/gdscript/doc_classes') diff --git a/modules/gdscript/doc_classes/@GDScript.xml b/modules/gdscript/doc_classes/@GDScript.xml index c8eda53a2d..4981750b7d 100644 --- a/modules/gdscript/doc_classes/@GDScript.xml +++ b/modules/gdscript/doc_classes/@GDScript.xml @@ -547,7 +547,7 @@ - Add a custom icon to the current script. After loading an icon at [param icon_path], the icon is displayed in the Scene dock for every node that the script is attached to. For named classes, the icon is also displayed in various editor dialogs. + Add a custom icon to the current script. The script must be registered as a global class using the [code]class_name[/code] keyword for this to have a visible effect. The icon specified at [param icon_path] is displayed in the Scene dock for every node of that class, as well as in various editor dialogs. [codeblock] @icon("res://path/to/class/icon.svg") [/codeblock] -- cgit v1.2.3