Skip to content

Commit

Permalink
Add custom pipeline config. (cocos#17390)
Browse files Browse the repository at this point in the history
  • Loading branch information
star-e authored Jul 19, 2024
1 parent b4ec47a commit be8df4e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
4 changes: 4 additions & 0 deletions EngineErrorMap.md
Original file line number Diff line number Diff line change
Expand Up @@ -3315,6 +3315,10 @@ Custom pipeline invalid render pass, program: %s. Please reimport all effects (M

Custom pipeline invalid render phase, program: %s. Please reimport all effects (Menu->Developer->Refresh All Effect) and restart creator.

### 12109

custom-pipeline module not available.

### 13100

Incorrect CCON magic.
Expand Down
18 changes: 16 additions & 2 deletions cocos/game/game.ts
Original file line number Diff line number Diff line change
Expand Up @@ -770,8 +770,22 @@ export class Game extends EventTarget {
return deviceManager.init(this.canvas, bindingMappingInfo);
})
.then(() => {
if (cclegacy.rendering && !macro.CUSTOM_PIPELINE_NAME) {
macro.CUSTOM_PIPELINE_NAME = 'Builtin';
const usesCustomPipeline = settings.querySettings(
Settings.Category.RENDERING,
'customPipeline',
);
if (usesCustomPipeline) {
if (!cclegacy.rendering) {
errorID(12109);
return;
}
if (!macro.CUSTOM_PIPELINE_NAME) {
// If custom pipeline is used, but the name is not set, use the default name
macro.CUSTOM_PIPELINE_NAME = 'Builtin';
}
} else {
// If custom pipeline is not used, disable custom-pipeline module
cclegacy.rendering = undefined;
}
assetManager.init();
builtinResMgr.init();
Expand Down

0 comments on commit be8df4e

Please sign in to comment.