Search Unity

How to quit Unity Android app using Process.KillProcess

Discussion in 'Android' started by BeringelaUnity, Sep 21, 2016.

  1. BeringelaUnity

    BeringelaUnity

    Joined:
    Jun 9, 2016
    Posts:
    5
    I want to quit a Unity Android app in such a way that the process is killed completely, and not paused or suspended or anything similar.

    To meet this requirement for a non-Unity program, developed in Xamarin/C#, I successfully called this code in C# and all was well:

    Android.OS.Process.KillProcess(Android.OS.Process.MyPid());

    How can I achieve this from Unity? I know Application.Quit() does seem to quit the game, but I can't tell if the process is being killed completely. To be safe I'd like to call the code above from Unity, but don't know how.
     
  2. OmerNazir

    OmerNazir

    Joined:
    Dec 3, 2020
    Posts:
    2
    Last edited: Dec 15, 2020