cocos里面是否有 立刻渲染这样的方法?
比如截图功能,Camera.targetTexture = new RenderTexture, 是需要下一帧才有效的,如果有立刻渲染的方法调用一下就无需等待下一帧,这样写代码就简单很多。
cocos里面是否有 立刻渲染这样的方法?
比如截图功能,Camera.targetTexture = new RenderTexture, 是需要下一帧才有效的,如果有立刻渲染的方法调用一下就无需等待下一帧,这样写代码就简单很多。
if (sys.isNative) {
director.root!.frameMove(0);
} else {
director.tick(0);
}
有效,谢谢!
请问是否还有其他更高效的方法? 我其实只是想用 Camera 对node进行截图生成 RenderTexture