Skip to content
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 at the end of the Controller's Lifecycle #62

Open
fustalol opened this issue Jan 22, 2018 · 2 comments
Open

How to close Unity at the end of the Controller's Lifecycle #62

fustalol opened this issue Jan 22, 2018 · 2 comments

Comments

@fustalol
Copy link

Hello, I've correctly setup my Unity application inside my iOS Application on VRARController:

OnTheGoDelegate *appDelegate = (OnTheGoDelegate *)[[UIApplication sharedApplication] delegate]; [appDelegate startUnity]; _unityView = UnityGetGLView(); CGRect screenRect = [[UIScreen mainScreen] bounds]; [_unityView setFrame:screenRect]; [self.view addSubview:_unityView];

and, on ViewWillDisappear

OnTheGoDelegate *appDelegate = (OnTheGoDelegate *)[[UIApplication sharedApplication] delegate]; [appDelegate stopUnity]; [_unityView removeFromSuperview]; _unityView = nil;

But unfortunately if I reopen the controller, Unity is on the same level of the previous launch of the controller.
How to stop and reset the Unity and UnityGetGLView when UIViewController has been removed, to restart It from the beginning If I reopen It?

@alexdoloz
Copy link

Same question here – I need to make fresh restart every time view controller with unity is presented. Anyone has any idea how to do it?

@oenama
Copy link

oenama commented Mar 24, 2018

same here. any ideas?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants