Skip to content

DenisDemyanko/UnityProblems

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

UnityProblems

Hello. I Have the problem with close unity application in native app. When I opening unity app from native application, every time RAM is increasing and after N times application is crashed.

How I run unity app from native:

    NSArray* arguments = [[NSProcessInfo processInfo] arguments];
    NSInteger count = [arguments count];
    char **array = (char **)malloc((count + 1) * sizeof(char*));
    
    for (NSInteger i = 0; i < count; i++) {
        array[i] = strdup([[arguments objectAtIndex:i] UTF8String]);
    }
    array[count] = NULL;
    char** argv = array;
    
    [[UnityFramework getInstance] registerFrameworkListener: self];
    [[UnityFramework getInstance] runEmbeddedWithArgc:1 argv:argv appLaunchOpts:@{}];

How I close unity app:

    [[UnityFramework getInstance] unloadApplication];

- (void)unityDidUnload:(NSNotification*)notification {
    [[UnityFramework getInstance] unregisterFrameworkListener: self];

    AppDelegate *app = (AppDelegate*) UIApplication.sharedApplication.delegate;
    [app.window makeKeyAndVisible];
}

1 Opening

[N|Solid

1 Close

[N|Solid

2 Opening

[N|Solid

2 Close

[N|Solid

3 Opening

[N|Solid

3 Close

[N|Solid

4 Opening

[N|Solid

4 Close

[N|Solid

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published