Hi everyone,
I’m newbie at Unity3d, familiar with XCode and cocoa. The manual of Unity is not very clearly about writing a iOS plugin.
Hi everyone,
I’m newbie at Unity3d, familiar with XCode and cocoa. The manual of Unity is not very clearly about writing a iOS plugin.
There are various blogs on the matter but generally its trivial, it only uses .NETs DLLImport (on which dozens++ detailed articles and thousands of knowledge threads exist on the web) against the special “function” internal as shown in the docs and expects extern “C” functions on the obj c side in .mm files
DLLImport is no unity but a standard .net feature thus not really documented by unity as not needed, cause msdn and go-mono already do so
I agree with the OP - there is next to no information on the subject where a simple HelloWorld plugin tutorial would help countless people get past some of the current limits of the Unity iOS platform.
+1
Guys I went digging for this. There is enough stuff that you will want to consider here that I will just cover it in the book as well (hopefully the publisher doesn’t freak out about adding new stuff):
http://unity3d.com/support/documentation/Images/manual/iPhoneNativeCodeSample.zip
Its just basic .NET functionality and on that end, there are hundreds of tutorials and articles on the web.
Just search for interfacing with native code, “C# DLLImport”, marshal c# or similar topics
Thats exactly how plugins work for unity.
No doubt, but unless you walk people through it it is still intimidating the first time you do it. There are a lot of people around here who simply don’t know .NET.
Thats why it has hundreds of thousands of pages documentation and books written on it
Also for most of those people .NET will be trivial compared to even getting basic stuff going in ObjC to work with iOS functionality, so anyone having problems with that side of the field will have a hellish trip to get anywhere on the other side of the fence where you only have a fraction of the information, docs and tutorials at hand and an extremely small dev community compared to .NET
Everything I found in the web is the same: only for small pieces of iOS code. What about adding a Xcode project with iOS frameworks as a Unity plugin??