Search Unity

Application.Unload() doesn't seem to be working

Discussion in 'Windows' started by admachina, Dec 21, 2016.

  1. admachina

    admachina

    Joined:
    Dec 19, 2016
    Posts:
    3
    I've been trying to get Application.Unload to work. It seems like when it's called it should tear down everything that is in the Unity engine and leave the rest of my app running as normal.

    I've tried attaching a behavior to an object similar to the one in the documentation for Application.Unload and when it's called nothing seems to happen.

    I was wondering if anyone knew of issues around this or if there are any pre-requisites for calling this or gotchas that I may be missing.

    Thanks.
     
  2. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,675
    Hey, I've asked the developer responsible for that feature to chime in.

    For completeness sake, which exact version of Unity are you on? You're targeting Windows Store, right? Are you on .NET or IL2CPP scripting backend?
     
  3. Masterfalcon

    Masterfalcon

    Unity Technologies

    Joined:
    Dec 29, 2014
    Posts:
    364
    Agreed with Tautvydas. Answers to his questions would be most helpful.
     
  4. admachina

    admachina

    Joined:
    Dec 19, 2016
    Posts:
    3
    I've tried both the released version of 5.5 and 5.6.0b2.

    I am targeting Windows Store.

    On 5.5 I tried both .NET and IL2CPP, on 5.6 I only have tried IL2CPP at this point.
     
  5. admachina

    admachina

    Joined:
    Dec 19, 2016
    Posts:
    3
    Any help here would be great.

    It's super unclear what this is doing/is supposed to do, and there don't seem to be full examples that use it, but it sounds like it'll potentially solve a problem for us but it doesn't really seem to be doing anything.
     
    Last edited: Jan 5, 2017
  6. Masterfalcon

    Masterfalcon

    Unity Technologies

    Joined:
    Dec 29, 2014
    Posts:
    364
    We have fixes for the issues that I'm working on getting in 5.5 right now. I'll let you know when to expect them.
     
  7. Masterfalcon

    Masterfalcon

    Unity Technologies

    Joined:
    Dec 29, 2014
    Posts:
    364
    Great news. Looks like they will be scheduled for release on 1/25/2017 as part of patch 5.5.1p1
     
  8. AteoMarcel

    AteoMarcel

    Joined:
    Jan 5, 2017
    Posts:
    17
  9. brucewu_trigger

    brucewu_trigger

    Joined:
    Sep 8, 2015
    Posts:
    3
    @Masterfalcon using Application.Unload in iOS using 2017.3 and it seems working. However, what is the proper way to re-initialize the Unity runtime afterward? Doing the usual UnityInitRuntime we always got error on the repaint call. Any insight is appreciated!
     
    BfLaoWang and ddaleymont like this.
  10. addavies

    addavies

    Joined:
    May 18, 2018
    Posts:
    8
    Anybody here to answer brucewu_trigger's question above? I too am interested. Thanks.
     
    ddaleymont likes this.
  11. GemmaLamontPerigee

    GemmaLamontPerigee

    Joined:
    Sep 14, 2018
    Posts:
    9
    Any answers to this? I would also be interested :)
     
  12. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,675
    I suggest asking on the iOS forum section about that.
     
    GemmaLamontPerigee likes this.