Преглед на файлове

Merge pull request #69166 from souplamp/icon-annotation-not-working

Update docs to clarify `@icon` only works with global script classes
Yuri Sizov преди 2 години
родител
ревизия
bf9cf7d034
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      modules/gdscript/doc_classes/@GDScript.xml

+ 1 - 1
modules/gdscript/doc_classes/@GDScript.xml

@@ -547,7 +547,7 @@
 			<return type="void" />
 			<return type="void" />
 			<param index="0" name="icon_path" type="String" />
 			<param index="0" name="icon_path" type="String" />
 			<description>
 			<description>
-				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]
 				[codeblock]
 				@icon("res://path/to/class/icon.svg")
 				@icon("res://path/to/class/icon.svg")
 				[/codeblock]
 				[/codeblock]