mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-04 18:42:40 +08:00
fix material bug (#4502)
This commit is contained in:
@@ -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); }
|
||||
|
||||
Reference in New Issue
Block a user