hide fallback effect in editor (#7840)

* hide fallback effect in editor

* refine
This commit is contained in:
Santy-Wang
2020-11-23 11:06:46 +08:00
committed by GitHub
parent 9edf1ab691
commit 9160abd320
2 changed files with 6 additions and 1 deletions
+1
View File
@@ -170,6 +170,7 @@ class BuiltinResMgr {
shaderInfo[shaderVersionKey] = shaderSource;
}
});
effect.hideInEditor = true;
effect.onLoaded();
});
this._initMaterials();
+5 -1
View File
@@ -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 资源。