Integrating Unity into SwiftUI iOS App with Native Tab Bar Interaction

106 Views Asked by At

How to update UnityAppController to use an existing UIView for rendering?

I'm working on an iOS app that uses Unity for rendering some parts of the application. Currently, I'm using the UnityAppController class to manage the integration with Unity. However, I'd like to modify it so that it doesn't create a new view but instead uses an existing UIView in my app for rendering the Unity content.

Currently, the UnityAppController creates a new window. What I want to achieve is to use a pre-existing UIView that I have in my app as the container for Unity's rendering.

What modifications do I need to make to UnityAppController so that I can use an existing UIView (let's call it existingView) as the container for Unity's rendering? I want to pass existingView as a parameter to a method or constructor in UnityAppController and have Unity render its content on that view.

Any guidance or examples on how to achieve this would be greatly appreciated!

0

There are 0 best solutions below