Unity-Technologies / uaal-example

Other
733 stars 233 forks source link

Application.quit is quitting whole native app #63

Open sakshi-oodles opened 2 years ago

sakshi-oodles commented 2 years ago

Hi Team,

i have integrated unity as a library in native swift project and it is working fine but there is a problem on close button as i have used Application.quit on close button and it closes the whole native app. But i want only unity app should close and when again click on showUnity then unity app should initialise properly but it closes whole native app.

Please help me to resolve this issue.

alamont commented 2 years ago

Try Application.unload()

dakezuo commented 1 year ago

Application.unload() does not exit all memory, quit does, but I found this note on the documentation: Note: You won’t be able to run Unity again in the same process after this call. You can set quitHandler on AppController to override the default process kill. I don't quite understand how to override the process, or who implements the exit and can continue the initialization, can you tell me how to implement it

tsuixl commented 9 months ago

Why when I test the Application.unload() interface on iOS devices, it only freezes Unity and does not unload it?