let targetTexture = this._targetTexture; if (targetTexture) { if (CC_EDITOR) { height = cc.engine.getDesignResolutionSize().height; } else { height = cc.visibleRect.height; } }
只需要把这段代码改成
let targetTexture = this._targetTexture; if (targetTexture) { height = targetTexture.height; //设置相机高度,使截图大小变化 }
就可以了。在以前版本的引擎里面也是这样的。