-
Notifications
You must be signed in to change notification settings - Fork 129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to close Unity Game (UnityView) #9
Comments
Hi @Vaibhaw-Redapple , I don´t know if there is some one maintaining this code (there are some interesting pr which I would like to merge). But this particular Issue is on my path I'll check it out and change the way it works or at least I'll make a method which destroys the unity instance. but it might take some time (my to do list is huge) to @asmadsen I would be happy to help you out maintaining this project. I'll be actively using it for a while I don't like the idea of having many forks with some small fixes. I think all effort should be in one place |
Hi, @rakirox I'm no longer maintain this repo. However I'm happy to merge any pr with fixed as long as it doesn't break existing features |
@Vaibhaw-Redapple Just a heads up, i just solved this issue on android. In the next days I'll check it out for iOS. It will release must of unity memory usage and unload all scenes but it will keep in memory enough things to make a faster init the next time. |
@rakirox any chance you could share how you've gone about it / maybe open a PR? |
@rakirox do you mind sharing how you achieved that? |
Yes! sorry been busy. tonight I'll draft a PR. I fixed only for android but haven't test it with iOS |
Thanks so much @rakirox! Been trying a few things using native code but I keep killing the whole app! |
People, I just draft a PR which attack this problem for Android so you can use it before it's ready. I hope this weekend I'll have time to resolve al pending points. cc: @Apetrou @paulfreund94 @Vaibhaw-Redapple |
@rakirox Thank you for this! Any luck with iOS? |
We solved this by just loading and unloading the main scene with void MessageHandler(string message)
{
Debug.Log("onMessage: " + message);
if (message == "start")
{
SceneManager.LoadScene("AR", LoadSceneMode.Additive);
} else if (message == "stop")
{
SceneManager.UnloadSceneAsync("AR");
}
} Not the most elegant solution but it works. |
In React Native App at some page i have loaded UnityView. After exiting from that page, when user visits again that page then can we start the unity once again not resuming. As of now it keeps running until app is killed from memory.
Means on page exit can unity be destroyed ?
The text was updated successfully, but these errors were encountered: