wait until resource is loaded before continue resolving
this bug is rare, but it was possible to stumble upon it when saving a scene in the editor
@@ -369,6 +369,8 @@ impl ResourceGraphVertex {
self.resource.state().path().display()
));
+ // Wait until resource is fully loaded, then resolve.
+ if block_on(self.resource.clone()).is_ok() {
block_on(
self.resource
.data_ref()
@@ -381,6 +383,7 @@ impl ResourceGraphVertex {
}
}
}
+}
struct ResourceDependencyGraph {
root: ResourceGraphVertex,
