From f49e3e59f670216fa9b4f7817430c228ed43d192 Mon Sep 17 00:00:00 2001 From: JoneLau <32630749+JoneLau@users.noreply.github.com> Date: Sun, 26 May 2019 22:26:08 +0800 Subject: [PATCH] fix material bug (#4502) --- cocos/3d/assets/material.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cocos/3d/assets/material.ts b/cocos/3d/assets/material.ts index e08e435e31..ebd497c756 100644 --- a/cocos/3d/assets/material.ts +++ b/cocos/3d/assets/material.ts @@ -104,7 +104,7 @@ export class Material extends Asset { } public initialize (info: IMaterialInfo) { - if (info.technique) { this._techIdx = info.technique; } + if (info.technique !== undefined) { this._techIdx = info.technique; } if (info.effectAsset) { this._effectAsset = info.effectAsset; } else if (info.effectName) { this._effectAsset = EffectAsset.get(info.effectName); } if (info.defines) { this._prepareInfo(info.defines, this._defines); }