Integrating ios Unity 3d into ios source code

I have native iOS code that is generated in Xcode 5.1. Also I have one sample 3d ios project code. I want to merge or integrate 3d ios code into my native ios code. How can I do this Thanks in advance ...


source to share

2 answers

Check it:

In short: Start over with a simple class, say FooPlugin.cs in Unity3D

, that does the following:

[DllImport ("__Internal")]
private static extern float _FooPluginFunction();


which has a public method:

public static void FooPluginFunction()
    _FooPluginFunction(); // call the native extension


Then create an XCode project and add FooPlugin.m that implements this method:

void FooPluginFunction() {
   // this is where native world is met




Please take a look at this link which describes Integrating Unity 3D inside a native iOS app



All Articles