Start a Unity app from inside a native iOS app

Hi everyone,

Can someone point me some documentation about how to start a Unity application from inside a native iOS app?

The idea is to use the Unity app as a module of bigger app.

Thanks!

Here you go http://fredandrandall.com/blog/2011/07/30/how-to-launch-your-macios-app-with-a-custom-url/

Remeber you can’t run an app inside another app just like that. There will be a quick (but apparent) task switch.

I’m looking for the same information, and having the same problem as you …
If I find something good, I let you know.
Tks
@mob

How about this.
Run iOS Unity-build from iOS App (Japanese)

http://bit.ly/Vtzf3k

I am also working on a solution to ADD Unity content to an existing native iOS App. On start up, a native iOS landing screen will present the option to continue to the native app content or go to the 3D experience.

My current solution is to instantiate this landing screen view and controller at the end of prepareRunLoop, add it to the main window, and pause Unity. When the “go to 3D” button is pressed on this landing screen it is destroyed and Unity is unpaused - revealing a functioning 3D application. When the “go to app” button is pressed I plan to figure out how to get our existing app’s initial view controller loaded and never unpause Unity (try to destroy it if I can). I’ll have to merge our app controller with the one Unity generates, and this process will have to happen any time we re-build the “combined” app. We don’t have a fully functional proof of this quite yet - but it is close.

I’m curious if this will get tripped up during Apple’s approval process. Anyone have experience with submitting something like this?

Another option is get in earlier in the loading process to stop Unity starting up until some native action is taken, but exploring this option was certainly difficult and not obvious. We had something like this working with Unity 3 and xcode ? a while back but many things have changed and we weren’t really happy with its complexity.

I am having a same sort of problem. i successfully add (ios) view controllers to the unity app and could navigate through properly. but i cannot initiate 2 instances by calling start unity in appController class even if i call SensorsCleanup(); ReleaseViewHierarchy(); when navigate to the native view controllers in the app (beside the game). When user needs to play he can click on play button and a new game is started again. How can i achieve it.

NSString* orientation = [[[NSBundle mainBundle] infoDictionary] objectForKey:@“UIInterfaceOrientation”];

    QCARUnityPlayer::getInstance().QCARInit([orientation UTF8String]);
    extern int _curOrientation;
    QCARUnityPlayer::getInstance().QCARSetOrientation(_curOrientation);
    appController = [[AppController alloc]init];
    [appController startUnity:[UIApplication sharedApplication]];

``When i try to call unity inside play button action it gives a following error.

2013-04-02 09:34:04.874 a[3119:907] INFO/AR(3119) 2013-04-02 09:34:04: QCAR SDK version 2.0.30
Mono path[0] = ‘/var/mobile/Applications/xxxxxxxxxxxxxxxx/a.app/Data/Managed’

  • Assertion: should not be reached at domain.c:1252

Thank you!

I wrote a tutorial about it for Unity 5 and Vuforia 4.x implementation in native iOS app.
It used IL2CPP Scripting Backend.

http://www.makethegame.net/unity/add-unity3d-to-native-ios-app-with-unity-5-and-vuforia-4-x/

Hope it helps someone as this guides are obsolete with the 64 Bit build

Hello! great discussion on the start of unity from a native ios app, if anyone wants to help regarding with ios app they can take help from apple support, here you can find your proper solution regarding with ios app.

Thanks a lot!!!

As a first solution, here is what I found so far:

http://technology.blurst.com/a-cocoa-based-frontend-for-unity-iphone-applications/

http://clevermartian.com/blog/?p=59

However those two solutions are from 2009 and 2010, I'm looking for something more recent. Anyway it should make my problem more clear.