Can I mix Unity with UIKit?

For example, if you have a UIKit-based application, can you turn on “Unity view” on a small part of the screen for a special effect, or use Unity exclude UIKit from the application?

+4
source share
1 answer

Using UIKit in a Unity-iOS project is not recommended. Because it incurs overhead when transferring control or messages from unity to UIKIt and vice versa. If you still need UIKit, you can create your own native iOS plugins for the interaction between Unity and UIKit.

In Unity, built-in plugins are used only if Unity does not. Examples include In-App, GameCenter, iAds, and some other major parts of the Objective-C iOS libraries that are not written for Unity, but you want to use them.

To send a message from UIKit to Unity, you can use the UnitySendMessage API for a simple text / string message to notify you of this event.

You can read more about the documentation in the Unity documentation.

0
source

All Articles