mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-02 08:42:43 +08:00
hide fallback effect in editor (#7840)
* hide fallback effect in editor * refine
This commit is contained in:
@@ -170,6 +170,7 @@ class BuiltinResMgr {
|
||||
shaderInfo[shaderVersionKey] = shaderSource;
|
||||
}
|
||||
});
|
||||
effect.hideInEditor = true;
|
||||
effect.onLoaded();
|
||||
});
|
||||
this._initMaterials();
|
||||
|
||||
@@ -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 资源。
|
||||
|
||||
Reference in New Issue
Block a user