Fix the particle build error when culling checked. (#7031)

This commit is contained in:
cary
2020-07-27 22:26:20 +08:00
committed by GitHub
parent 7d13f6c321
commit 7a553576ef
+1 -1
View File
@@ -989,6 +989,6 @@ export class ParticleSystemComponent extends RenderableComponent {
}
public _onBeforeSerialize (props) {
return this.enableCulling ? props.filter(p => !PARTICLE_MODULE_PROPERTY.includes(p) || this[p].enable) : props;
return this.enableCulling ? props.filter(p => !PARTICLE_MODULE_PROPERTY.includes(p) || (this[p] && this[p].enable)) : props;
}
}