I’m using this to load script from my scripts folder
pc.app.assets.loadFromUrl('/scripts/raycast.js', 'script', function (err, asset) {
e.addComponent('script');
e.script.create('raycast');
});
But it returns
Loading failed for the <script> with source “https://launch.playcanvas.com/api/scripts/pulse.js".
My asset hierarchy here:
Can anyone help me? Thanks a lot.