简体   繁体   中英

How to quit a unity app which is opened by URL SCHEME and go back to the main app?

I have a IOS app which show product details and for the AR section it opens another unity app.What I want to do is Quit the Unity app and go back to same page in the main app.I have used the following code.

public void BackHome()
{
    Application.Quit();
}

The problem with this code is it quits like termination not smooth closing of app.Also it goes directly to the Home screen not to the app (that is main app page from where the Unity App opened up).What I want to do is open Unity app from the main app and after that while hitting a back button would like to close the unity app and return to the main app.

In player setting in Unity I have given Behaviour in BackGround - Exit.

在退出Application.Quit之前,请尝试通过URLSCHEME打开主应用程序:Application.OpenURL(“ XXXXXX”)。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM