Search Unity

UI options for app configuration on tvOS?

Discussion in 'iOS and tvOS' started by JoeStrout, Aug 13, 2019.

  1. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    We have an app written originally for macOS. It's sort of a kiosk display thing, and configuration is done either on-screen via mouse and keyboard (popping up an options canvas with the Esc key), or via a configuration (text) file placed next to the app. Configuration involves some toggles, a couple sliders, and some numeric inputs.

    Now we are making a tvOS version, as a cheaper/simpler hardware alternative to the Mac Mini. It's working fine, but we're scratching our heads over how to handle configuration. It doesn't seem you can just place a text file next to the app; and there is (generally) no keyboard to press the Esc key on. I know I could use the Apple TV Remote, but it's not clear to me whether that will pop up an onscreen keyboard when an input field has the focus. (I have no experience with tvOS outside of this project.)

    I know that on iOS, many apps have their own preference panels that appear in the Settings app, though I don't know if those can be made with Unity. And I don't know if tvOS even has such a thing.

    So. How should we be handling app configuration in this situation?
     
  2. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,789
    You can pair a bluetooth keyboard :
     
  3. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    True. But I'd rather not make the end-users do that.

    I can easily enough pop up the UI with an input from the remote. But it doesn't appear that Unity has any standard support for navigating and manipulating UI elements on AppleTV. There isn't even anything resembling a mouse cursor that I have found.

    But now that I look at it, I don't understand why this doesn't Just Work. The docs say that swipes on the remote are translated into "Horizontal" and "Vertical" axes. I have "Send Navigation Events" checked on my Event System, and a Standalone Input Module with these axes set. But when I test, I can swipe like mad and nothing appears to happen.

    Should this work, or am I barking up the wrong tree?
     
  4. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,789
    Because everything around the Remote is either implemented badly or not working at all in Unity.

    I don't really use Unity GUI for anything so I don't know really, but maybe UnityEngine.Apple.TV.Remote.reportAbsoluteDpadValues could help? (although it works weirdly)