OpenGL 和 Unity 无法在 iOS 上协同工作
我已将游戏从 Unity 导出到 Xcode,一切正常,游戏运行正常。
我决定在菜单中添加一个 OpenGLView(在 Xcode 中构建),以在具有 2D 纹理的 3D 平面上进行一些转换,然后在 UIImage 中捕获它。一切正常,图像已拍摄,但是当我进入 Unity 环境时,我收到:
floomzer(9403,0x3fc1448c) malloc: *** mmap(size=1077534720) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
PlayerLoop called recursively!
(Filename: /Applications/buildAgent/work/6bc5f79e0a4296d6/Projects/../Runtime/Misc/Player.cpp Line: 1201)
PlayerLoop called recursively!
(Filename: /Applications/buildAgent/work/6bc5f79e0a4296d6/Projects/../Runtime/Misc/Player.cpp Line: 1201)
如果我不加载菜单的 OpenGL 部分,而是直接进入 Unity 环境,则游戏正常启动。
与 Unity 和我的 OpenGL-ES 视图冲突吗? 我对 OpenGL 状态的更改是否会影响 Unity OpenGL 渲染?
I have exported my game from Unity to Xcode and everything is ok, the game is running normally.
I decided to add one OpenGLView in the menus (build in Xcode) to make some transformations over a 3D plane with 2D texture, and then capture it in UIImage. Everything was ok, the image is taken, but when I enter in Unity environment I receive:
floomzer(9403,0x3fc1448c) malloc: *** mmap(size=1077534720) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
PlayerLoop called recursively!
(Filename: /Applications/buildAgent/work/6bc5f79e0a4296d6/Projects/../Runtime/Misc/Player.cpp Line: 1201)
PlayerLoop called recursively!
(Filename: /Applications/buildAgent/work/6bc5f79e0a4296d6/Projects/../Runtime/Misc/Player.cpp Line: 1201)
If I do not load the OpenGL part of the menu, but go straight to the Unity environment, the game starts normally.
Is it a conflict with Unity and my OpenGL-ES view?
Did my changes over the OpenGL state affect Unity OpenGL rendering?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论