3

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
  • is this question about Unity3D plugins? If so, why it's upvoted? Commented Sep 15, 2014 at 10:48

1 Answer 1

1

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
}
Sign up to request clarification or add additional context in comments.

3 Comments

hello, thanks but suppose i just copied Unity ios code to my native ios code.. then it will work or not ?
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 ?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.