PreloadScene doesn't load resource files on web-mobile build on 3.7.1

Hi,
First of all, thanks for the greate game engine :wink:

Currently, I’m working on a project which is targeting someone uses this webapp
via very low download speed network.
Silent loading assets before switching scenes is mandatory, so I tried using ‘preloadScene’ method.
However, it seems like this method only works on Previews and not works in a web-mobile version build.

I recognized it’s not working by browser’s network log.
Here are the network log screenshots.

(You can see it in original size by clicking it.)

Here is each section of image’s description.

Section 1- This is a network log for running Preview on chrome browser.
I captured this before clicking ‘ENTER’ button which triggers loadscene() method.
Log lines below the selected blue line are all the assets using in the next scene.
You can see preloadScene is called and downloading assets for next scene is done successfully.

Section 2- This one I captured after loadscene() is called.
No downloading logs because preloadscene already done the job.
Everything works great.

Section 3- This one is for running Web-mobile build on Chrome.
The one that I have problem with.
I also took this screenshot before clicking ‘ENTER’ button.
You can see preloadscene’s callback method is called,
but there are no resources for the next scene downloaded.

Section 4- After I click button and trigger loadscene() method,
PNG resources in the next scene are started to be downloaded.

I tested it both Chrome and Microsoft Edge with enabled ‘Disable cache’ option on windows 10.
I also tried both Cocos creator 3.7.0 and 3.7.1 but the result was same.

Here is my source code.

@ccclass(‘IntroSceneManager’)

export class IntroSceneManager extends Component {

onLoad(){
    director.preloadScene("sceneWorld", ()=>{
        console.log("PRELOAD DONE.");
    });
}

OnEnterButton(){
    director.loadScene("sceneWorld");
}

}

Thank you for your feedback, I have talked to our engineers and confirmed that this is a bug and I have created a new issue for this problem at Using preloadScene to preload scenes, the effect is inconsistent between previewing and building web-mobile · Issue #14653 · cocos/cocos-engine · GitHub.
We will confirm this issue and fix it as soon as possible.

Sorry for late reply, in Using preloadScene to preload scenes, the effect is inconsistent between previewing and building web-mobile · Issue #14653 · cocos/cocos-engine · GitHub, we have a temp fix, you can merge it manually. and be careful, it’ll cost more performence during preloading. And in next version, we will consider collecting the dependency relationship in editor so that we will not rely on deserialization any more.

1 Like

Hi @SantyWang , we’re facing similar issues both in Cocos 3.7 and 3.8. Any information when this is supposed to get fixed. Our release is blocked because of this issue.