-
-
Notifications
You must be signed in to change notification settings - Fork 249
Add main loop callbacks to ExtensionLibrary
#1313
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
base: master
Are you sure you want to change the base?
Conversation
66e5afc
to
5daf025
Compare
API docs are being generated and will be shortly available at: https://godot-rust.github.io/docs/gdext/pr-1313 |
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 for the update!
5cbea37
to
a012d2f
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.
Thank you! Some thoughts:
- Godot uses "startup" and "shutdown", I think we should keep things consistent with the other godot-rust APIs and use "init" and "deinit" instead. Then we'd have
on_level_init
+on_main_loop_init
, etc. - Is there a strict order between the levels and the main loop? If yes, should we (not in this PR, but a follow-up) consider representing
MainLoop
as its ownInitLevel
?
I think it's better to make them separate functions, keeping |
a012d2f
to
663535e
Compare
Closes #1299.
Adds
on_main_loop_startup
,on_main_loop_frame
,on_main_loop_shutdown
callbacks toExtensionLibrary
for Godot 4.5.This PR needs rebase once we have
api-4.5
feature.