Skip to content

Commit 2cfb62e

Browse files
Check for UIDs in strings as well (#2497)
If you use an exported variable with a path to a file (let's say a timeline): `@export_file var timeline = ""` Godot will automatically use a UID path (something like `uid://d0kqf1bb2ev0` instead of `res://timeline.dtl`) file to avoid having issues when moving that file in the future. This check in Dialogic is only expecting for the string `res://` in the argument, so if you do something like `Dialogic.start(timeline)` it will fail to run. The fix just adds a check for UID as well.
1 parent 986c730 commit 2cfb62e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

addons/dialogic/Core/DialogicGameHandler.gd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ func start_timeline(timeline:Variant, label_or_idx:Variant = "") -> void:
198198
# load the resource if only the path is given
199199
if typeof(timeline) == TYPE_STRING:
200200
#check the lookup table if it's not a full file name
201-
if (timeline as String).contains("res://"):
201+
if (timeline as String).contains("res://") or (timeline as String).contains("uid://"):
202202
timeline = load((timeline as String))
203203
else:
204204
timeline = DialogicResourceUtil.get_timeline_resource((timeline as String))

0 commit comments

Comments
 (0)