[CC 3.X.X] - Preview / Build Templates are missing?

Hello,

In CC version 2.X.X I had the ability to add a preview-template or build-template folders to override the default engine settings without manipulate the internal files.

I can see that in CC 3.X.X those features are missing for some reason.
I believe you changed them. Is there a way to override the preview html and the build html in CC 3.X.X as well?

I can ask engineering to respond.

I tested preview-template and build-template, it works well as 2.X.X. Here is preview-template:https://docs.cocos.com/creator/3.3/manual/en/editor/preview/browser.html , build-template:https://docs.cocos.com/creator/3.3/manual/en/editor/publish/custom-project-build-template.html

1 Like

Thank you…

This will do :slight_smile:

Hello again,

We this in the preview template:

<%- include(cocosTemplate, {}) %>

I am wondering where are all the files that it takes and how can I override them.
What I am trying to do here is basically run my own scripts which will launch the games.

In Cocos 2 I removed the lauch mechanizem and ran it on my own like this:

 if (CC_PHYSICS_BUILTIN || CC_PHYSICS_CANNON) {
     const cocosPhysicsPath = `${Path._.CC_GAME_FOLDER}${debug ? 'physics.js' : 'physics-min.js'}`;
     File.deployExternalLib(cocosPhysicsPath, () => {
         window.boot();
     }, () => {
         Logger._.Alert("Cocos Creator", `The path ${cocosPhysicsPath} could not be loaded.`);
     });
} else {
    window.boot();
}

I can see that there is a file in the preview templated:

scripts.ejs

But when I copy it to my preview-template, the runtime ignores this file.

Can you assist here?

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