From 152ac91634c59b12c2c0799644c479afecf85e57 Mon Sep 17 00:00:00 2001 From: Jackerty Date: Sat, 3 Jun 2023 14:30:51 +0300 Subject: [PATCH] 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 https://github.com/godotengine/godot/pull/75472). Commit makes a mention of this in the C++ tutorial. --- .../gdextension/gdextension_cpp_example.rst | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tutorials/scripting/gdextension/gdextension_cpp_example.rst b/tutorials/scripting/gdextension/gdextension_cpp_example.rst index 54ef0f55b9cb..9f5ce431194a 100644 --- a/tutorials/scripting/gdextension/gdextension_cpp_example.rst +++ b/tutorials/scripting/gdextension/gdextension_cpp_example.rst @@ -421,6 +421,22 @@ We're finally ready to run the project: .. image:: img/gdextension_cpp_animated.gif +Custom editor icon +------------------ +By default, Godot uses the node icon it is inheriting from in the scene dock. The custom icon can be +added via the ``gdextension`` file. The node's icon is set by reference to its name and resource path +of an SVG file. + +For example: + +.. code-block:: none + + [Icon] + GDExample = "res://icons/GDExample.svg" + +The path should point to a 16 by 16 pixel SVG image. Read the guide for :ref:`creating icons ` +for more information. + Adding properties -----------------