Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

WP8 Handling the back button

Discussion in 'Windows' started by Jase-NZ, Jul 31, 2013.

  1. Jase-NZ

    Jase-NZ

    Joined:
    Jul 31, 2013
    Posts:
    26
    Is there a way of dealing with the WP8 back button with-in the Unity App?
    For example, captured back button sends the app to the app start screen.
     
  2. spacefrog

    spacefrog

    Joined:
    Jun 14, 2009
    Posts:
    732
    Like on Android devices, the back button is bound to the Escape key. So you can query the Escape key in an update and act accordingly
    eg.
    Code (csharp):
    1.  
    2. void Update()
    3. {
    4.     if(   Input.GetKeyDown(KeyCode.Escape) ) HandleBackbutton();
    5.     ...
    6. }
     
    Last edited: Jul 31, 2013
  3. Jase-NZ

    Jase-NZ

    Joined:
    Jul 31, 2013
    Posts:
    26
    Thank you spacefrog, tested and confirmed.
     
  4. Shayan Rais

    Shayan Rais

    Joined:
    Jun 3, 2013
    Posts:
    2
    How to access the [[Home, Search and Phone Lock Button]] of wp8 in Unity via C#.

    I want to call my GamePause() fuction, if user press the Home/Search Button.

    I can access the Back Button via Input.GetKeyDown(KeyCode.Escape) But I dont know how to access Search, PhoneLock and Home Button.

    Thanks
     
  5. Shayan Rais

    Shayan Rais

    Joined:
    Jun 3, 2013
    Posts:
    2
    How to access the [[Home, Search and Phone Lock Button]] of wp8 in Unity via C#.

    I want to call my GamePause() fuction, if user press the Home/Search Button.

    I can access the Back Button via Input.GetKeyDown(KeyCode.Escape) But I dont know how to access Search, PhoneLock and Home Button.

    Thanks
     
  6. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,529
  7. Gmotagi

    Gmotagi

    Joined:
    Jul 27, 2013
    Posts:
    13
    You can't change the behaviour of the home button or search button in WP.They will launch home screen and Bing respectively.