-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Update GDExtension tutorial with the hot reload feature #9618
Conversation
@@ -364,7 +364,8 @@ loaded for each platform and the entry function for the module. It is called ``g | |||
[configuration] | |||
|
|||
entry_symbol = "example_library_init" | |||
compatibility_minimum = "4.1" | |||
compatibility_minimum = "4.2" |
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.
Is there a reason to bump this? I would rather have people extend their compatibility ranges than chasing latest. Maybe the trade-off could be elaborated in the text.
The ``reloadable`` flag enables your extension to be automatically loaded every time you recompile it, | ||
without needing to restart the editor. This only works if you compile your extension in debug mode. |
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.
Maybe mention "loaded by the editor". I had lots of user being confused why "hot reloading" cannot reload in a running game. The term that Godot chose here is rather unfortunate.
.. note:: | ||
|
||
The hot reloading feature only works of you compiled your library with debug mode (default). | ||
Also make sure it's enabled in the .gdextension file as shown above. | ||
|
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.
This seem to be doubled with the changes above. I would rather specify the section in the gdextension file
explanation of the [configuration]
section
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.
Missed this bit, sorry. Needs a squash afterwards.
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.
Looks good to me so far.
Note: This will only be mergeable for master and 4.2 as it's not supported for 4.1 and 4.0
@@ -388,6 +389,8 @@ loaded for each platform and the entry function for the module. It is called ``g | |||
This file contains a ``configuration`` section that controls the entry function of the module. | |||
You should also set the minimum compatible Godot version with ``compatability_minimum``, | |||
which prevents older version of Godot from trying to load your extension. | |||
The ``reloadable`` flag enables your extension to be automatically reloaded by the editor every time you recompile it, |
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 ``reloadable`` flag enables your extension to be automatically reloaded by the editor every time you recompile it, | |
The ``reloadable`` flag enables automatic reloading of your extension by the editor every time you recompile it, |
Although the tutorial assumed the hot reload feature, it wasn't enabled in the example config file. Also it didn't mention that it only works if it's compiled in debug mode.
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 good to me!
Merged. Thanks and congrats on your first merged contribution! |
…9618) Although the tutorial assumed the hot reload feature, it wasn't enabled in the example config file. Also it didn't mention that it only works if it's compiled in debug mode.
Although the tutorial assumed the hot reload feature, it wasn't enabled in the example config file. Also it didn't mention that it only works if it's compiled in debug mode.