Search Unity

  1. The 2022.1 beta is now available for testing. To find out what's new, have a look at our 2022.1 beta blog post.
    Dismiss Notice

The app does not exit when a user selects the back or close button

Discussion in 'Daydream' started by overfile, Jan 31, 2017.

  1. overfile

    overfile

    Joined:
    Oct 21, 2013
    Posts:
    27
    Hello,

    We are developing a videogame with Unity and Google Daydream. We finished the first version last friday and, when we publish in Google Play. we recibe a message error in my email: "The app does not pause when a user selects the home or back button".

    We have tested the game and the home button works good, when the home button is pressed, the user go to the daydream store, if the user pressed again the home button, the user return to game in the same moment when i press the first time. So yesterday, we republish the apk with a new version.

    The message error was change: "The app does not exit when a user selects the back or close button". How can we mapped the exit button in daydream or cardboard?

    We're using GVR Unity SDK v1.10.0, android-ndk-r10e and Unity Daydream Preview 5.4.2f2-GVR13.

    Regards,
    Overfile.
     
  2. overfile

    overfile

    Joined:
    Oct 21, 2013
    Posts:
    27
    Ok, i can map the button with Input.GetKeyDown (KeyCode.Escape), so we hope with this we can publish the game.
     
  3. duncangroberts

    duncangroberts

    Joined:
    Jul 22, 2015
    Posts:
    69
    You can also use a bit of code from the teleport script in the SDK:

    void LateUpdate()
    {
    GvrViewer.Instance.UpdateState();
    if (GvrViewer.Instance.BackButtonPressed)
    {
    Application.Quit();
    }
    }
     
    overfile likes this.
unityunity