From 1d28f2552b8e5bdda96940b17f97b1813eeb42dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20Br=C3=BCckner?= <17685000+MoritzBrueckner@users.noreply.github.com> Date: Fri, 7 Jul 2023 16:50:26 +0200 Subject: [PATCH] Fix black screen and display warning if referenced group doesn't exist --- Sources/iron/Scene.hx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Sources/iron/Scene.hx b/Sources/iron/Scene.hx index f2707903..462de368 100644 --- a/Sources/iron/Scene.hx +++ b/Sources/iron/Scene.hx @@ -573,7 +573,7 @@ class Scene { var object = addObject(parent); returnObject(object, o, function(ro: Object) { if (o.group_ref != null) { // Instantiate group objects - spawnGroup(format, o.group_ref, ro, function() { done(ro); }); + spawnGroup(format, o.group_ref, ro, () -> done(ro), () -> done(ro) /* also call done when failed to ensure loading progress */); } else done(ro); }); @@ -586,6 +586,7 @@ class Scene { var object_refs = getGroupObjectRefs(groupRef, format); if (object_refs == null) { // Group doesn't exist + trace('Failed to spawn group "$groupRef", group doesn\'t exist'); if (failed != null) failed(); } else if (object_refs.length == 0) {