Search Unity

Implementation: Quitting from main menu stops Editor play mode

Discussion in 'Open Projects' started by paciFIST_Studios, Jul 18, 2021.

  1. paciFIST_Studios

    paciFIST_Studios

    Joined:
    May 14, 2017
    Posts:
    14
    Summary: I think the editor should end game mode, if the user exits from the main menu. It is simple to do in code.

    Repro steps:
    1. Run the game in editor
    2. Get to the Main Menu
    3. Exit -> Confirm Exit

    Result:
    4. Nothing happens

    Expectation:
    5. If in editor, editor stops play mode
    6. If in stand-alone, application closes


    upload_2021-7-17_16-51-26.png upload_2021-7-17_16-53-14.png
     
  2. paciFIST_Studios

    paciFIST_Studios

    Joined:
    May 14, 2017
    Posts:
    14
    Smurjo likes this.
  3. cirocontinisio

    cirocontinisio

    Joined:
    Jun 20, 2016
    Posts:
    884
    Is it really needed? Entering and exiting Play mode can be a time consuming operation (thankfully not too much on this project). So when one presses the button even if just to test it and it exits Play mode, it's more damage than good. We already have a Debug.Log informing the user that the button works.
     
  4. paciFIST_Studios

    paciFIST_Studios

    Joined:
    May 14, 2017
    Posts:
    14
    I must defer to your judgement on this topic. I submitted a pull request because I thought this would be an improvement. I do not mind closing the pull request.
     
    Smurjo and cirocontinisio like this.
  5. cirocontinisio

    cirocontinisio

    Joined:
    Jun 20, 2016
    Posts:
    884
    Yeah, I see that it could seem like a logical "quit" in the editor, but I do think it introduces more annoyance than usefulness. So I'll proceed to close the PR. Thanks anyway :)
     
  6. Smurjo

    Smurjo

    Joined:
    Dec 25, 2019
    Posts:
    296
    I would also see it as improvement and implement it in own projects that way. When you sometimes test the build (which I find very necessary, especially with Addressables) and sometimes in the editor you kind of stumble over the different behaviour again and again.
     
  7. paciFIST_Studios

    paciFIST_Studios

    Joined:
    May 14, 2017
    Posts:
    14
    cirocontinisio likes this.