Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

SmartTV 2015 Air Remote enter key problem

Discussion in 'Samsung Smart TV' started by MacroPinch, Nov 28, 2016.

  1. MacroPinch


    Dec 6, 2013
    We are testing our game on a 2015 Samsung SmartTV, which has Air Remote. We are trying to use both the "Pointer" and Dpad functionality of the remote, but encountered a problem. Here's what happens:

    In order to enable the Pointer functionality, we are setting a Default Cursor in Player Settings and using

    SamsungTV.touchPadMode = SamsungTV.TouchPadMode.Mouse;

    The Pointer works as expected. The user can point items and click them.
    The Dpad arrow keys also work as expected. You can navigate up, down, left, and right.

    The problem is that, when the user presses the Dpad Enter key Input.GetMouseButtonDown (0) returns true, just like the pointer key.

    We are expecting when Dpad Enter is pressed Input.GetKeyDown (KeyCode.Return) to return true.

    Please note that when SamsungTV.touchPadMode = SamsungTV.TouchPadMode.Dpad the Dpad Enter works as expected, but you can't use the pointer functionality in this mode.

    And one more minor issue:
    1. Game starts and the cursor is not visible
    2. The user puts his finger on the remote's pointer button
    3. The cursor shows up on the screen
    4. The user lifts his finger from the pointer button, the cursor centers on the screen, but does not hide.

    We are expecting the cursor to automatically hide, when the user lifts his finger from the pointer button, just like in the TV's native interface. Unfortunately, there is no way in unity to detect, when the user lifts his finger and we can't call Cursor.visible = false.
  2. Jaehyun


    Unity Technologies

    Feb 4, 2014
    Hi MacroPinch,

    The 'Enter' key works like mouse button 0 in case SamsungTV.touchPadMode is SamsungTV.TouchPadMode.Mouse.
    You can get the 'Enter' click event by Input.GetMouseButtonDown only.
    Please set your expecting code in Input.GetMouseButtonDown(0) instead of Input.GetKeyDown (KeyCode.Return).

    And Samsung TV platform doesn't provide the finger release event to unity.
    So I think it is not possible to detect that event in user script side also.