I have a native iOS code which is created in Xcode 5.1, Also I have one sample unity 3d ios project code. I want to merge or integrate unity 3d ios code into my native ios code. How can I do that the same Thanks In Advance
1 Answer
Check this out:
http://docs.unity3d.com/Manual/PluginsForIOS.html
Briefly:
Start first from simply one class let's say FooPlugin.cs in Unity3D which do the following:
[DllImport ("__Internal")]
private static extern float _FooPluginFunction();
which has public method:
public static void FooPluginFunction()
{
_FooPluginFunction(); // call the native extension
}
Then build XCode project and add some FooPlugin.m which implements this method:
void FooPluginFunction() {
// this is where native world is met
}
3 Comments
Apple
hello, thanks but suppose i just copied Unity ios code to my native ios code.. then it will work or not ?
Apple
i have unity 3d project (already converted to objective-c language for ios) and i want to used that project into my native ios project, so how can i do that ?
Injectios
check this out:stackoverflow.com/questions/4272413/…