-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add documentation about .gdextension file #9383
base: master
Are you sure you want to change the base?
Add documentation about .gdextension file #9383
Conversation
2b73f33
to
f567fa1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this looks great!
Only a few notes, mostly small wording changes for clarity.
b47f96d
to
90e7155
Compare
90e7155
to
ac065d9
Compare
ac065d9
to
91b93c8
Compare
91b93c8
to
cea6ef0
Compare
Thanks for the feedback! Should be good now |
Update tutorials/scripting/gdextension/gdextension_file.rst
cea6ef0
to
ecc21c6
Compare
Updated to feedback, added another sections about icons support and removed the icons section from the Example page as it makes no sense to have it double |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! This is looking very nice :-)
I just have a few suggestions, mostly small wording changes for clarity.
| **entry_symbol** | Name of the entry function for initializing the GDExtension. This function should be defined in | | ||
| | the ``register_types.cpp`` file. Adding this is necessary for the extension to work. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The note about register_types.cpp
is only for godot-cpp. Maybe something like:
| **entry_symbol** | Name of the entry function for initializing the GDExtension. This function should be defined in | | |
| | the ``register_types.cpp`` file. Adding this is necessary for the extension to work. | | |
| **entry_symbol** | Name of the entry function for initializing the GDExtension. This function should be defined in | | |
| | the ``register_types.cpp`` file when using godot-cpp. Adding this is necessary for the extension to work. | |
| | depend on features from newer versions of Godot. **Only supported for Godot 4.1+** | | ||
+-------------------------------+------------------------------------------------------------------------------------------------------+ | ||
| **compatibility_maximum** | Maximum compatible version. This prevents newer versions of Godot from loading the extension. | | ||
| | **Only supported for Godot 4.3+** | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| | **Only supported for Godot 4.3+** | | |
| | **Only supported in Godot 4.3+** | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"or later" might also be good to add.
| | the ``register_types.cpp`` file. Adding this is necessary for the extension to work. | | ||
+-------------------------------+------------------------------------------------------------------------------------------------------+ | ||
| **compatibility_minimum** | Minimum compatible version. This prevents older versions of Godot from loading extensions that | | ||
| | depend on features from newer versions of Godot. **Only supported for Godot 4.1+** | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| | depend on features from newer versions of Godot. **Only supported for Godot 4.1+** | | |
| | depend on features from newer versions of Godot. **Only supported in Godot 4.1+** | |
| **reloadable** | Reloads the extension upon recompilation. Reloading is not supported for every exposed class. | | ||
| | This flag should be mainly used for developing or debugging an extension. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is meant by "Reloading is not supported for every exposed class"? It should work for any class, although, some can have additional considerations, for example, editor plugins.
It may be worth pointing out that not all GDExtension bindings support it? We could mention that godot-cpp for Godot 4.2+ does - I'm not sure it makes sense trying to list other bindings, because that list will always be growing
| **reloadable** | Reloads the extension upon recompilation. Reloading is not supported for every exposed class. | | ||
| | This flag should be mainly used for developing or debugging an extension. | | ||
+-------------------------------+------------------------------------------------------------------------------------------------------+ | ||
| **android_aar_plugin** | The GDExtension is part of a :ref:`v2 Android plugin <doc_android_plugin>`. During export this flag | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not clear from this description that this is a boolean property. Perhaps we should be listing the type for each property?
--------------------- | ||
|
||
+-------------------------------+------------------------------------------------------------------------------------------------------+ | ||
| Instruction | Description | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure about calling these "Instruction"s. Maybe "Property" instead?
| Instruction | Description | | |
| Property | Description | |
----------------- | ||
|
||
In this section you can set the paths to the compiled binaries of your GDExtension libraries. | ||
By setting feature flags you can filter which version should be loaded and exported with your |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By setting feature flags you can filter which version should be loaded and exported with your | |
By specifying feature flags you can filter which version should be loaded and exported with your |
In this section you can set the paths to the compiled binaries of your GDExtension libraries. | ||
By setting feature flags you can filter which version should be loaded and exported with your | ||
game depending on which feature flags are active. Every feature flag must match to Godot's | ||
feature flags or your custom export flags to run in an exported game. For instance ``macos.debug`` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
feature flags or your custom export flags to run in an exported game. For instance ``macos.debug`` | |
feature flags or your custom export flags to be loaded in an exported game. For instance ``macos.debug`` |
linux.release.rv64 = "res://bin/libgdexample.linux.template_release.rv64.so" | ||
|
||
|
||
Here are lists of available built-in options (for more look at the :ref:`feature tags <doc_feature_tags>`): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here are lists of available built-in options (for more look at the :ref:`feature tags <doc_feature_tags>`): | |
Here are lists of some of the available built-in options (for more look at the :ref:`feature tags <doc_feature_tags>`): |
This is a WIP draft in the effort to improve the GDExtension docs for users
Adds details how to configure the
.gdextension
file and aids as a quick reference guide to add support for platforms