Search Unity

No longer possible to call Application.Quit()?

Discussion in 'PSM' started by coolpowers, Jun 20, 2014.

  1. coolpowers

    coolpowers

    Joined:
    Mar 23, 2010
    Posts:
    125
    Updated everything for the release version, and it appears that calling Application.Quit() no longer has any effect. I was using this to speed testing, I could just hit Select on the Vita and it would exit back to the Dev Assistant, but now I have to completely quit and restart the Dev Assistant every time I deploy.

    Could we possibly get this back in a future release? :)
     
  2. jesusluvsyooh

    jesusluvsyooh

    Joined:
    Jan 10, 2012
    Posts:
    377
    For d
    If they brought it back i presume it will only be for debugging purposes, as like iOS, i think your not allowed a quit button on your games, you have to do it the PS Vita button, then swipe app corner off way.
     
  3. eriQue

    eriQue

    Unity Technologies

    Joined:
    May 25, 2010
    Posts:
    595
    The problem is that quitting the application "programmatically" is actually a violation of the so-called TRC (technical requirements checklist) for PS Vita.

    Maybe a small .bat script with PsmDeviceForUnity.exe -kill <GUID> is an acceptable work around?
     
  4. zezba9000

    zezba9000

    Joined:
    Sep 28, 2010
    Posts:
    992
    I would have Application.Quit enabled when doing debug builds (as suggested, this is nice for testing), but when you do a final build maybe you can disable the feature there instead internally? As you have Debug and Master options anyway I don't see how this would not be easy to do.
     
  5. eriQue

    eriQue

    Unity Technologies

    Joined:
    May 25, 2010
    Posts:
    595
    This is of course possible. But, the flip-side of such an approach is the possible confusion if a developer creates logic that relies on Application.Quit() working, only to realize that is doesn't when actually releasing the game.
    The current approach is to instead provide consistency.

    But - I can totally see the benefit of exposing DevAssistant functionality - maybe through a separate UnityEngine.PSM.DevAssistant API..
     
  6. zezba9000

    zezba9000

    Joined:
    Sep 28, 2010
    Posts:
    992
    Ya through a different PSM API would be best, good idea :)
     
  7. coolpowers

    coolpowers

    Joined:
    Mar 23, 2010
    Posts:
    125
    Yep, sounds good. As I say, this is only ever something I do during development.
     
  8. AlexGK

    AlexGK

    Joined:
    Jul 31, 2013
    Posts:
    38
    Wait, do games on PS Vita actually have an option to quit the game? As far as I know, it's not an option, and the only way to quit a game is to press the PS button and close the live area.
     
  9. MDaveUK

    MDaveUK

    Joined:
    Apr 27, 2014
    Posts:
    14
    You don't need to quit the game any more to retest a new build version (which we had to do before in the preview).

    Just Build and Run like normal while your game is still running on the Vita and it will auto restart and install the new build ;)

    I suggest this info be more known to others to help save on dev time!
     
  10. eriQue

    eriQue

    Unity Technologies

    Joined:
    May 25, 2010
    Posts:
    595
    That's exactly why the Application.Quit() is not allowed, and now does nothing. ;)
     
  11. eriQue

    eriQue

    Unity Technologies

    Joined:
    May 25, 2010
    Posts:
    595
    Actually - the Public Preview should've also handled this (but maybe there was an issue in some cases?).
    Either way - yes, Build&Run should handle this for you ; no need to quit the application or restart the DevAssistant, before clicking Build&Run in the editor.

    If you (for some reason) want to automate the same thing from a .bat file (or similar) you need to first reset the DevAssistant (-kill) before installing (-install) and launching (-launch_unity). It's all in the docs btw ;)