Search Unity

Start over after the home button is pressed

Discussion in 'iOS and tvOS' started by LumoKvin, Jan 26, 2020.

  1. LumoKvin

    LumoKvin

    Joined:
    Sep 28, 2019
    Posts:
    195
    I want the game to start from the main menu every time the app is opened. When I open the app the first time, it starts at the main menu. When I open the app a second time, it starts from where the I left off.

    The same thing happens when I push the power button. I can play the game, leave it for 2 days, then when I open the app again, it is in the same spot where I left off. I want it to start the main menu instead.

    How can I make it so that it always starts at the main menu?
     
  2. Moonjump

    Moonjump

    Joined:
    Apr 15, 2010
    Posts:
    2,572
    In the Player settings, set Behavior in Background to Exit.
     
  3. User340

    User340

    Joined:
    Feb 28, 2007
    Posts:
    3,001
    I don't see that as a possibility, so I would recommend loading the main menu scene in OnApplicationFocus and making sure that script exists in every scene.
    Screen Shot 2020-01-30 at 4.33.59 PM.png
     
  4. Moonjump

    Moonjump

    Joined:
    Apr 15, 2010
    Posts:
    2,572
    I've updated Unity to 2018.4 since I made that post. The option I suggested is no longer available.