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

Fix QodotMap builds outside of scene tree & optional blocking builds #97

Merged
merged 2 commits into from
Feb 11, 2022

Conversation

Matoking
Copy link
Contributor

Scene tree isn't available when QodotMap is instantiated outside of a scene tree. In this case, use Engine.get_main_loop() to yield control to the engine to keep the editor responsive while building the map.

Using Engine.get_main_loop() in every scenario (even when the scene tree is available) causes the editor to crash. Using it as a fallback does not seem to have any problems, though.

Scene tree isn't available when QodotMap is instantiated outside of a
scene tree. In this case, don't yield at all; this has the side effect
of blocking until the build is finished.
When enabled, QodotMap will block until the map has finished building.
This helps when building small maps where Godot might otherwise spend a lot
of time idle between build steps for a single map.
@Matoking Matoking changed the title Fix QodotMap builds outside of scene tree Fix QodotMap builds outside of scene tree & optional blocking builds May 18, 2020
@Shfty Shfty merged commit 405a45d into QodotPlugin:master Feb 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants