Skip to content

Commit a82f08e

Browse files
authored
Visual Editor: Fix temporary character not persisting (#2571)
- fixes: #2570
1 parent e098088 commit a82f08e

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

addons/dialogic/Modules/Text/event_text.gd

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -325,12 +325,15 @@ func from_text(string:String) -> void:
325325
else:
326326
character = DialogicResourceUtil.get_character_resource(name)
327327

328-
if character == null and Engine.is_editor_hint() == false:
329-
character = DialogicCharacter.new()
330-
character.display_name = name
331-
character.set_identifier(name)
332-
if portrait:
333-
character.color = Color(portrait)
328+
if character == null:
329+
if Engine.is_editor_hint() == false:
330+
character = DialogicCharacter.new()
331+
character.display_name = name
332+
character.set_identifier(name)
333+
if portrait:
334+
character.color = Color(portrait)
335+
else:
336+
character_identifier = name
334337

335338
if not result:
336339
return

0 commit comments

Comments
 (0)