Blending Unity generated code with Objective-C in iOS?

Can I mix iOS code and UI elements with iOS code released by Unity?

For example, if I work with a game developer who develops a game in Unity, can I take his xCode project (generated by Unity) and add the interface elements that I encode for myself using Objective-C and Interface Builder, etc.?

From what I see, this is impossible, since everything was created through Unity .... but, I hope, I'm wrong ...

Thank!

+9
ios iphone ipad unity3d
Nov 24 '10 at 23:12
source share
6 answers

You can even use third-party libraries in Xcode and integrate them into the build process. After you returned with the correct settings, I wrote a blog entry about this:

iPhone and Unity3D: integration of third-party static libraries into Unified3D generated Xcode projects

+6
Aug 16 2018-11-11T00:
source share

You should be able to create your own plugins to interact with Unity code. However, you need to write a wrapper. More details: http://unity3d.com/support/documentation/Manual/Plugins.html

Read the part on iOS :)

+2
Apr 09 2018-11-18T00:
source share

I came across this general guide to working with native Unity plugins in OSX, which were useful and probably where you need to look for your answer, as Zophiel said

https://blog.reigndesign.com/blog/unity-native-plugins-os-x

+2
Oct. 31 '11 at 8:37
source share

You can simply create a view and a button to cause the unity to start or stop, but the models in the unity cannot be controlled with Obj-C, although the unity imports into Xcode, it only imports the source code, game scripts depending on the link libraries that are not can be changed.

+1
Mar 21 '11 at 7:25
source share

I think you can do it the same way as I probably worked with Objective-C without any changes. The Unity code generator stores its own codes in classes.

And besides, there is another way to do this, which is called "Plug-in".

But I hope Unity developers find a better way that blends seamlessly with Xcode, as Apple employees usually do.

Combining the integrated IB editor and Unity in the future will be better and more welcome.

0
Jun 04 '13 at 12:17
source share

Probably yes. Recommended for beginners or intermediate levels of Devs? Probably no. A Unity project is generated and regenerated every time you click an assembly. Now I believe that if you use Append when you build, it should save the existing changes in the Xcode project ... but "should" is the operational word. You may need to implement some build system, such as Jeeves, to minimize headaches if you are trying to do this in a large project where you see a constant stream of updates from both Unity and Xcode.

Now, if you integrate code that contains its own files in it and does not overlap or overwrite the code that Unity created, the Append function will actually work for you, but if you delete, modify, or add code to any of the files that Unity generates, then definitely use SVN or some other form of source control and a snapshot before and after each new generation of Unity to recompile / generate Xcode.

Also check out the Unity Asset store. No matter what functionality you try to execute home brew in Xcode, you can definitely write in C # in Unity. Someone else may already have defeated the problem you are trying to solve and put it in the asset store for $ 5.

Hope this helps.

0
Jan 27 '15 at 1:01
source share



All Articles