diff --git a/cocos/core/3d/builtin/init.ts b/cocos/core/3d/builtin/init.ts index 9e57fb7608..d431feeca8 100644 --- a/cocos/core/3d/builtin/init.ts +++ b/cocos/core/3d/builtin/init.ts @@ -170,6 +170,7 @@ class BuiltinResMgr { shaderInfo[shaderVersionKey] = shaderSource; } }); + effect.hideInEditor = true; effect.onLoaded(); }); this._initMaterials(); diff --git a/cocos/core/assets/effect-asset.ts b/cocos/core/assets/effect-asset.ts index d1190ab505..d45dd9b895 100644 --- a/cocos/core/assets/effect-asset.ts +++ b/cocos/core/assets/effect-asset.ts @@ -28,7 +28,7 @@ * @module material */ -import { ccclass, serializable, editable } from 'cc.decorator'; +import { ccclass, serializable, editable, editorOnly } from 'cc.decorator'; import { EDITOR } from 'internal:constants'; import { Root } from '../root'; import { BlendState, DepthStencilState, RasterizerState, DescriptorType, @@ -192,6 +192,10 @@ export class EffectAsset extends Asset { @editable public combinations: IPreCompileInfo[] = []; + @serializable + @editorOnly + public hideInEditor = false; + /** * @en The loaded callback which should be invoked by the [[Loader]], will automatically register the effect. * @zh 通过 [[Loader]] 加载完成时的回调,将自动注册 effect 资源。