Make Engine.get_main_loop() valid before _static_init() #7716
CsloudX
started this conversation in
Engine Core
Replies: 1 comment 2 replies
-
I think it's probably bad practice to use |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the project you are working on
NoGame App
Describe the problem or limitation you are having in your project
I'm so love Godot4's static variable and I want design a Helper class for auto set some information for Engine.get_main_loop().root, but failed. In _static_init function, Engine.get_main_loop() return null.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
IMO, it should alway can get Engine.get_main_loop() and Engine.get_main_loop().root.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
/
If this enhancement will not be used often, can it be worked around with a few lines of script?
/
Is there a reason why this should be core and not an add-on in the asset library?
/
Beta Was this translation helpful? Give feedback.
All reactions