fix material bug (#4502)

This commit is contained in:
JoneLau
2019-05-26 22:26:08 +08:00
committed by pandamicro
parent 9c6b873735
commit f49e3e59f6
+1 -1
View File
@@ -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); }