How to remove included scene

I am using Cocos Creator 3.3.2

I have created 3 scenes in scene folder

  1. initial loader
  2. scene for desktop
  3. scene for mobile

My plan is to set the home scene as initial loader and detect mobile or desktop version then load the correct scene from the resources folder.

I moved the 2 scenes to the resources folder now. (originally they were not in resources folder)

I am using following to load the scene. Everything is working as expected.

private doDownload(path: string) {

        resources.loadScene(path, function (err: Error | null, scene: any) {

            if (err) {
                console.log(err);
                return;
            }

            if (scene != null) {

                director.runScene(scene);
            }
        });
    }

The problem I have is when I try to build the game I see desktop and mobile scenes also.
Can’t see a way to remove them.
Wouldn’t it only have the game scene (initial loader) since other scenes get loaded from resources folder?

Is there a way to remove this ?

I can ask engineering to have a look.

There is currently no way to handle this situation. If you uncheck this scene, the package will not contain it.
The included scenes in the build panel are all the scenes included in the project.

If you want to load this scene dynamically, then you still need to check this scene in the build panel so that the resources it references can also be packed into the game.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.