Skip to content

Commit 21a380a

Browse files
committed
Fix GEN_EDIT_STATE_* flag for runtime builds
1 parent 41fcc9e commit 21a380a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

addons/qodot/src/nodes/qodot_map.gd

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,10 @@ func build_entity_nodes() -> Array:
429429
node = ClassDB.instance(entity_definition.node_class)
430430
elif entity_definition is QodotFGDPointClass:
431431
if entity_definition.scene_file:
432-
node = entity_definition.scene_file.instance(PackedScene.GEN_EDIT_STATE_INSTANCE)
432+
var flag = PackedScene.GEN_EDIT_STATE_DISABLED
433+
if Engine.is_editor_hint():
434+
flag = PackedScene.GEN_EDIT_STATE_INSTANCE
435+
node = entity_definition.scene_file.instance(flag)
433436

434437
if entity_definition.script_class:
435438
node.set_script(entity_definition.script_class)

0 commit comments

Comments
 (0)