Getting major issue in loading models from remote json - model is loading but not the texture

The local_engine attribute only works the on the launcher from the editor. Not the PlayCanvas served builds.

As you were on the ORG plan, I assumed that you will export the builds to host on your own servers, is this correct?

I am not exporting the build. I am just using build’s URL at the other place.

Can’t I solve this issue in the server builds?

Not that I’m aware of, unfortunately. It be nice if the editor allowed you to change the version to target during the builds.

@dave Can you help me out changing the engine version in the server builds.

Any idea about how much time will it take to fix the issue?
Also, If I will export the project to my own server then which file will I need to replace for stable version?

playcanvas-stable.min.js

Latest stable version in this link https://github.com/playcanvas/engine is 1.6.4 and my projects’s playcanvas-stable.min.js also has the same version. From where can I get the previous version?

@yaustar I am looking for playcanvas engine version 1.6.3 or any previous one for the above issue. Can you help with some link? I am getting 1.6.4 stable version everywhere but it’s same to the one I have in my project and getting texture issue.

The version you are looking for is 1.6.2 (as the change was introduced in 1.6.3) and they can be found here:

On a side note, Dave has made a fix for this issue but has failed some tests. Hopefully, a new release will be soon to fix the issue: https://github.com/playcanvas/engine/pull/1308

Thanks @yaustar but I am cannot find the min.js file in these projects to replace in my project. All are showing 1.6.4 stable version in readme files.

My bad, I forgot that the releases on GitHub do not have the complied version.

You can get the built versions from https://code.playcanvas.com/playcanvas-1.6.2.min.js

Just change the version number to the one you want in the URL.

I tried replacing all the versions from 1.4.4 to 1.6.3 but getting the same issue in every version. Still cannot see the texture of assets.

It worked for me using the Console Sandbox project. Are you getting any errors in the browser console? Have you tried deleting the cache to ensure that the browser is not caching an old engine file?

Yes I am getting this error.

That’s a cross origin error. This thread talks about the fix: ☑ Cross-origin error when self-hosting

I just put those lines of code in the first thing I can hook in. I think you can even do this in the pre loader script.

In the __loader__.js script, I did:

pc.script.createLoadingScreen(function (app) {
	var handler = app.loader.getHandler("texture");
	handler.crossOrigin = "anonymous";


    var showSplash = function () {
// Rest of the script

This is working again in 1.6.6

@dave I am seeing something strange. Few of my items have got the texture back but not all. Few are still having only shaders and no texture. Any idea?

Are you getting any errors in the console? Would you be able to provide a sample project/model link that showcases the error?

It’s resolved. The issue was again for CORS, I can see textures for all the items now. Thanks a lot @yaustar and @dave.