Skip to content

Commit 78747d7

Browse files
committed
Document relative paths in .gdextension files being supported
- Mention support for comments in `.gdextension` files. - List recommended import options for GDExtension icons.
1 parent eb758a0 commit 78747d7

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed

tutorials/scripting/gdextension/gdextension_file.rst

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,10 @@ Here is an example of what that can look like:
5050

5151
.. code-block:: none
5252
53+
; A comment line starts with a semicolon. This line is ignored by the engine.
5354
[libraries]
5455
55-
macos.debug = "res://bin/libgdexample.macos.template_debug.framework"
56+
macos.debug = "res://bin/libgdexample.macos.template_debug.framework" ; Inline comments are also allowed.
5657
macos.release = "res://bin/libgdexample.macos.template_release.framework"
5758
windows.debug.x86_32 = "res://bin/libgdexample.windows.template_debug.x86_32.dll"
5859
windows.release.x86_32 = "res://bin/libgdexample.windows.template_release.x86_32.dll"
@@ -65,6 +66,12 @@ Here is an example of what that can look like:
6566
linux.debug.rv64 = "res://bin/libgdexample.linux.template_debug.rv64.so"
6667
linux.release.rv64 = "res://bin/libgdexample.linux.template_release.rv64.so"
6768
69+
.. tip::
70+
71+
While absolute ``res://`` paths are shown in the above example, relative paths
72+
like ``bin/libgdexample.linux.template_debug.x86_64.so`` are also allowed.
73+
Relative paths can be used to ensure the extension successfully loads
74+
regardless of which folder it was installed in.
6875

6976
Entries are matched in order, so if two sets of feature tags could match
7077
the same system, be sure to put the more specific ones first:
@@ -138,8 +145,8 @@ Architecture
138145
Icons section
139146
-------------
140147

141-
By default, Godot uses the Node icon in the scene dock for GDExtension nodes. A custom icon can be
142-
set by reference to its name and resource path of an SVG file.
148+
By default, Godot uses the Node icon in the scene dock for GDExtension nodes.
149+
A custom icon can be set by reference to its name and resource path of an SVG file.
143150

144151
For example:
145152

@@ -149,7 +156,14 @@ For example:
149156
150157
GDExample = "res://icons/gd_example.svg"
151158
152-
The path should point to a 16 by 16 pixel SVG image. Read the guide for :ref:`creating icons <doc_editor_icons>`
159+
The path should point to a 16×16 pixel SVG image, with two options enabled on the
160+
image in the Import dock:
161+
162+
- **Editor > Scale with Editor Scale**.
163+
- **Editor > Convert Colors with Editor Theme**.
164+
165+
Enabling both options ensures the icon behaves as closely as possible to
166+
the stock editor icons. Read the guide for :ref:`creating icons <doc_editor_icons>`
153167
for more information.
154168

155169
Dependencies section

0 commit comments

Comments
 (0)