Unity3D integration with UIView

前端 未结 4 1641
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-01 07:22

Please correct me if this question is duplicated. I just came across Unity3D and I just want to ask if it is possible to integrate Unity3D on top of other UIView?

4条回答
  •  清歌不尽
    2021-02-01 08:10

    Yes it is.

    This thread goes into detail: http://forum.unity3d.com/threads/unity-appcontroller-subclassing.191971/

    One of the Unity developers even posts example code. Not how to specifically put Unity on a UIView, but how to encompass the Unity AppController to do ultimately whatever you want with it.

    I have been maintaining hybrid Unity CocoaTouch apps for a few years. It used to be a complete hack. Now Unity has marginal support for it based on the things outlined in that thread. But it is a chore to keep it maintained. iOS and Unity slightly change every release, thus you must reintegrate unity into the iOS app a little different each release. Sometimes weird issues have come up that took me days to resolve. I personally, from experience, would avoid doing Unity and CocoaTouch hybrid apps for anything serious and highly predictable until they make it a bit more official. Ideally have official documentation about it in the manual. Not just have one of the developers posting code examples and the forum.

提交回复
热议问题