Search Unity

  1. If you have experience with import & exporting custom (.unitypackage) packages, please help complete a survey (open until May 15, 2024).
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice

How to make X button work in 5.5.3f1 - Google VR SDK ?

Discussion in 'Scripting' started by u_rs, Apr 25, 2017.

  1. u_rs

    u_rs

    Joined:
    Jan 5, 2016
    Posts:
    147
    I tried to add following to Update, and attached those script to an empty object:
    if (Input.GetKey(KeyCode.Escape))
    {
    Application.Quit();
    }

    I'm using latest version of GVR. I don't use 5.6.0f3 because of this.
     
  2. patrick508

    patrick508

    Joined:
    May 21, 2015
    Posts:
    40
    Try
    Code (CSharp):
    1.  if (Input.GetKeyDown(KeyCode.Escape)){
    2. Application.Quit();
    3. }
     
  3. u_rs

    u_rs

    Joined:
    Jan 5, 2016
    Posts:
    147
    No difference.
     
  4. patrick508

    patrick508

    Joined:
    May 21, 2015
    Posts:
    40
    Weird, it should work. No idea than. You sure the script is getting called and active? If yes, you sure if ever gets inside the getkey ?
     
  5. u_rs

    u_rs

    Joined:
    Jan 5, 2016
    Posts:
    147
    Not sure. I'm not interested in this issue anymore. I use Unity 5.6 now. Thanks.