Skip to content
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

Merged
merged 1 commit into from
Aug 14, 2024

Conversation

Szotyi2501
Copy link
Contributor

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.

@AThousandShips AThousandShips requested a review from a team July 17, 2024 12:37
@@ -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"
Copy link

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.

Comment on lines 392 to 393
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.
Copy link

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.

Comment on lines 510 to 514
.. 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.

Copy link
Contributor

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

Copy link
Contributor

@paddy-exe paddy-exe left a 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.

Copy link
Contributor

@paddy-exe paddy-exe left a 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,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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,

@AThousandShips AThousandShips added area:manual Issues and PRs related to the Manual/Tutorials section of the documentation topic:gdextension labels Jul 19, 2024
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.
Copy link
Contributor

@dsnopek dsnopek left a 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!

@mhilbrunner mhilbrunner merged commit 91717ff into godotengine:master Aug 14, 2024
1 check passed
@mhilbrunner
Copy link
Member

Merged. Thanks and congrats on your first merged contribution!

Lukas-Fletcher pushed a commit to Lukas-Fletcher/godot-docs that referenced this pull request Aug 24, 2024
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:manual Issues and PRs related to the Manual/Tutorials section of the documentation cherrypick:4.2 topic:gdextension
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants