From 96b4683dd656ea1eb2cc8bee1fea12fc83a1d9b1 Mon Sep 17 00:00:00 2001 From: Vaios Kalpias-Ilias Date: Sun, 26 Jul 2015 11:38:18 +0300 Subject: [PATCH] [FIX] engine only material loading when there are no textures --- src/asset/asset_registry.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/asset/asset_registry.js b/src/asset/asset_registry.js index 662f205d0d1..423ea866642 100644 --- a/src/asset/asset_registry.js +++ b/src/asset/asset_registry.js @@ -376,6 +376,11 @@ pc.extend(pc, function () { } } + if (!count) { + callback(null, textures); + return; + } + for (i = 0; i < urls.length; i++) { self.loadFromUrl(urls[i], "texture", function (err, texture) { textures.push(texture);