Skip to content

Commit 1487cae

Browse files
committed
Mentioning the GDExtension icon support
A node that is loaded through GDExtension can have a custom icon. Icon's path can be added via the `gdextension` file. (See godotengine/godot#75472). Commit makes a mention of this in the C++ tutorial.
1 parent 5a0916e commit 1487cae

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

tutorials/scripting/gdextension/gdextension_cpp_example.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,22 @@ We're finally ready to run the project:
421421

422422
.. image:: img/gdextension_cpp_animated.gif
423423

424+
Custom editor icon
425+
------------------
426+
By default, Godot uses the node icon in the scene dock for GDExtension nodes. The custom icon can be
427+
added via the ``gdextension`` file. The node's icon is set by reference to its name and resource path
428+
of an SVG file.
429+
430+
For example:
431+
432+
.. code-block:: none
433+
434+
[Icon]
435+
GDExample = "res://icons/GDExample.svg"
436+
437+
The path should point to a 16 by 16 pixel SVG image. Read the guide for :ref:`creating icons <doc_editor_icons>`
438+
for more information.
439+
424440
Adding properties
425441
-----------------
426442

0 commit comments

Comments
 (0)