OpenGL 和 Unity 无法在 iOS 上协同工作

发布于 2024-11-30 04:25:32 字数 760 浏览 0 评论 0原文

我已将游戏从 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文