This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UnityLoader.compatibilityCheck = function (unityInstance, onsuccess, onerror) { | |
if (!UnityLoader.SystemInfo.hasWebGL) { | |
unityInstance.popup('Your browser does not support WebGL', | |
[{text: 'OK', callback: onerror}]); | |
} else { | |
onsuccess(); | |
} | |
} | |
// now you can call ... var unityInstance = UnityLoader.instantiate( ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var newScript = document.createElement("script"); | |
newScript.onload = function() { | |
var spector = new SPECTOR.Spector(); | |
spector.displayUI(); | |
}; | |
document.head.appendChild(newScript); | |
newScript.src = "https://spectorcdn.babylonjs.com/spector.bundle.js"; |