Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Black screen after Application.Quit() and re-open

Discussion in 'Android' started by Nyankoooo, Jan 11, 2018.

  1. Nyankoooo

    Nyankoooo

    Joined:
    May 21, 2016
    Posts:
    144
    When I open my app for the first time, everything works fine, but when I close it with Application.Quit() and the re-open it, the screen turns black and nothing is happening.

    The only way to start the app again is force closing it and then re-open it again. Then it opens normally, but after that the process repeats.

    Working-> black screen -> force quit -> working -> black screen -> force quit -> repeat

    I saw an old thread from 2014 talking about using 32-bit Display Buffer, but that setting is already on.

    First encountered this issue after upgrading from Unity 5.6 to 2017.3.0f3
     
  2. Yury-Habets

    Yury-Habets

    Unity Technologies

    Joined:
    Nov 18, 2013
    Posts:
    1,165
    Try to update to a latest patch release. If it doesn't help - please submit a bug report; don't forget to attach a minimal project needed to reproduce the issue.
     
  3. mholub

    mholub

    Joined:
    Oct 3, 2012
    Posts:
    123
    Hi, your problems looks similar to our. Have you find any solution?
     
  4. Deleted User

    Deleted User

    Guest

    Same thing here. One year passed and no solution cool
     
  5. Nyankoooo

    Nyankoooo

    Joined:
    May 21, 2016
    Posts:
    144
    What plugins are you guys using? Maybe by cross-checking this, we can find the actual reason!
     
  6. JoeVolumetrica

    JoeVolumetrica

    Joined:
    Jan 29, 2019
    Posts:
    1
    Has anyone found a solution to this issue?

    -Update
    I have found that this solution works in my project

    private void OnApplicationQuit()
    {
    UnityEngine.Debug.Log("application is quitting");
    System.Diagnostics.Process.GetCurrentProcess().Kill();
    ProcessThreadCollection pt = Process.GetCurrentProcess().Threads;
    foreach (ProcessThread p in pt)
    {
    p.Dispose();
    }
    }
     
    Last edited: Apr 8, 2019