Changing assets paths

Dear forum,

I working on a project and they are using Drupal to embed the code. We need to host the assets externally because the client does not want to set up another directory. I am having a hell of a time trying to figure out how to change the paths to pull in the “SCRIPTS” and I am looking through playcanvas-stable.min.js right now trying to figure out where it is creating the links to the files.

If anyone has any expertise in this I would be so grateful.



Not tried it so bear with me. In the asset.js, there is a url property. You could change the behaviour so that if it is a relative path, you prefix with your external URL root path.

Another thought is that there is a JSON file in the exported build that has all the assets and paths/URL to said assets that you could patch. Edit: Look at config.json

Thanks @yaustar.I ended up hacking the playcanvas-stable.min.js and it worked just fine. It’s not the most elegant solution, but it worked and I can use it going forward. I unfortunately was not able to find the assets.js file you spoke about.

@groupsjrBrianDouglas For further readers, can you describe what is your hack? Maybe the community will find a more elegant solution.