Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mixing Unity generated code with Objective-C in iOS?

Is it possible to mix iOS code and interface elements with Unity generated iOS code?

For example if I am working with a game developer who is developing a game in Unity, could I take his xCode project (generated by Unity), and add interface elements which I code myself using Objective-C & Interface Builder etc?

From what I can see this isn't possible as everything is created via Unity.... but hopefully I am wrong...

Thanks!

like image 486
cal Avatar asked Nov 24 '10 23:11

cal


People also ask

Is Unity compatible with iOS?

Building games for iOS. Bring your game to life with Unity, the chosen platform for over 60% of the top-grossing mobile games on the Apple App Store.

How do I create a Unity project to Xcode and iOS device?

Build the app by going to File -> Build Settings, selecting iOS and clicking Build. Unity will build the selected scenes and produce an XCode project in the selected folder. Depending on your versions of Unity and Xcode, you may be able to select Build and Run instead.

How do you make a game on Unity iOS?

Build your game for iOSOpen Unity, go to File > Build Settings, and select Switch Platform on the bottom of the window. Unity will start making the switch, once it is finished, the Unity icon will appear next to the iOS icon and the Build option will be activated.

Can you use Swift with Unity?

You can use any Swift code in your Unity project. You can call Swift void's from Unity but also actual return types. You can pass on variables from Unity to the Swift Functions.


1 Answers

You can even use 3rd party libraries in XCode and integrate them in the build process. After fiddling around with the right settings I wrote a blog entry about this:

iPhone & Unity3D: Integrating 3rd Party Static Libraries in Unity3D Generated XCode Projects

like image 61
Kay Avatar answered Sep 20 '22 14:09

Kay