Prechádzať zdrojové kódy

Merge pull request #5355 from bghgary/gltf-validator-fix

Catch and log a warning when glTF validator fails
David Catuhe 6 rokov pred
rodič
commit
fe18d62cf6

+ 5 - 0
loaders/src/glTF/babylon.glTFFileLoader.ts

@@ -587,6 +587,11 @@ module BABYLON {
 
                 this.onValidatedObservable.notifyObservers(result);
                 this.onValidatedObservable.clear();
+            }, (reason) => {
+                this._endPerformanceCounter("Validate JSON");
+
+                Tools.Warn(`Failed to validate: ${reason}`);
+                this.onValidatedObservable.clear();
             });
         }