Skip to content

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

@fustalol

Description

@fustalol

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions