Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  2. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    Dismiss Notice

handle exit button

Discussion in 'Samsung Smart TV' started by lumaluis, Dec 17, 2014.

  1. lumaluis

    lumaluis

    Joined:
    Nov 18, 2014
    Posts:
    10
    How can i handle the exit button of the remote control, i do not want that the application quit
    I want to put a popup with option if you really want to close the application.
    Thank you and sorry for my english
     
  2. AlexThibodeau

    AlexThibodeau

    Unity Technologies

    Joined:
    Jul 23, 2013
    Posts:
    309
    Hey there,

    This is how I typically catch the "Return/Exit" events:
    Code (CSharp):
    1. if (Input.GetKey (KeyCode.Escape))
    2. {
    3. // Do stuff
    4. }
    If they press and hold the Return/Exit button you won't be able to catch and stall those events however.
     
  3. lumaluis

    lumaluis

    Joined:
    Nov 18, 2014
    Posts:
    10
    ahh ok ok
    but i needed the on hold exit button, but like you say it won't be able to catch that
    thank you
     
unityunity