I’m trying to do some platform detection with platform.js but I’m confused about about how to “source” a script in a playcanvas repo. I’ve uploaded the script “Platform.js” to the playcanvas project, how should I source it?
var script = document.createElement('script');
script.onload = function () {
//do stuff with the script
};
script.src = "Platform.js"; // ??
document.head.appendChild(script); //or something of the likes
Thank you.