动态生成spriteFrame的问题

  • Creator 版本: 2.4.3

  • 目标平台: Android真机

  • 重现方式:

  • 首个报错:

  • 之前哪个版本是正常的: 2.1.3

用代码生成spriteFrame的时候会报错,报错信息如下图

代码:
spriteVal.spriteFrame = new cc.SpriteFrame( texture,
new cc.Rect( 0, 0, texture.width, texture.height ),
false,
cc.Vec2.ZERO,
new cc.Size( texture.width, texture.height ) );

很奇怪这种写法为什么会出现那种错误

怎么看都不像是 SF 的问题