引擎版本2.3.0 采用
const isIOS14Device = cc.sys.os === cc.sys.OS_IOS && cc.sys.isBrowser && cc.sys.isMobile && /iPhone OS 14/.test(window.navigator.userAgent);
if (isIOS14Device) {
cc.MeshBuffer.prototype.checkAndSwitchBuffer = function (vertexCount) {
if (this.vertexOffset + vertexCount > 65535) {
this.uploadData();
this._batcher._flush();
}
};
cc.MeshBuffer.prototype.forwardIndiceStartToOffset = function () {
this.uploadData();
this.switchBuffer();
}
}
提示 undefined is not an object (evaluating cc.MeshBuffer.prototype)?