QodotPlugin / qodot-plugin

(LEGACY) Quake .map support for Godot 3.x
MIT License
960 stars 70 forks source link

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

Closed Matoking closed 2 years ago

Matoking commented 4 years ago

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.