Search Unity

Application Uninstall event in C#?

Discussion in 'Scripting' started by ercion, Nov 19, 2018.

  1. ercion

    ercion

    Joined:
    Aug 15, 2016
    Posts:
    73
    Is there an application uninstall event in Unity C# scripting API?
     
  2. lordofduct

    lordofduct

    Joined:
    Oct 3, 2011
    Posts:
    8,532
    No.

    Because the game isn't running when it gets uninstalled.

    Furthermore, 'uninstall' is not a guaranteed event. If they just happen to 'delete' the contents of your folder, there's no way to know if they uninstalled. They just deleted it.

    This is why many applications (especially in windows) come with installers and uninstallers. And you're supposed to run said 'uninstaller' to do it. This way if you need to do any extra heavy-lifting during uninstall (such as remove values from the registry or something), you can.
     
  3. ercion

    ercion

    Joined:
    Aug 15, 2016
    Posts:
    73
    I see. Makes sense. Guess I'll have to use a workaround then. Thanks for replying!