Open haekb opened 3 years ago
This is caused because GEN_EDIT_STATE_INSTANCE is an editor-only parameter that I assumed it would fail in a friendly way, but throws an error and crashes the script instead.
Replacing line 432 of qodot_map.gd with the following should fix it:
var edit_state
if Engine.is_editor_hint():
edit_state = PackedScene.GEN_EDIT_STATE_INSTANCE
else:
edit_state = PackedScene.GEN_EDIT_STATE_DISABLED
node = entity_definition.scene_file.instance(edit_state)
Need to make sure the new version of QodotMap behaves correctly in this respect.
Oof that's a title.
Basically my game uses runtime map generation, and it's very neat! (So thank you!) I've ran into a bit of a problem (but also found a work-around.)
Here's my old point entity setup:
It worked great in-editor, however once I did a test export I kept getting the error message:
It would point to line 437 of
qodot_map.gd
. Which actually is the result of the above error being triggered on line 432.A work-around I found was to just create a point entity using a "Script class" instead. This class would just load the scene and add it as a child like so:
Let me know if you need anymore information!