Search Unity

Nvidia Shield Android TV Development

Discussion in 'Android' started by Storyteller, Jul 3, 2015.

  1. Storyteller

    Storyteller

    Joined:
    May 15, 2012
    Posts:
    23
    so I picked up the Shield Pro 500 GB model on launch day.

    Within 12 hours I was able to,

    unpack and setup
    install unity
    install visual studio
    install nvidia androidworks

    make a simple digital painting,
    load it into unity,
    compile a unity file
    export to apk
    copy on my thumbdrive
    run on my tv

    so, on day 1, I was able to deploy a simple test to my tv.

    Unity + the Nvidia Shield = an independent developers devkit.
     
  2. Storyteller

    Storyteller

    Joined:
    May 15, 2012
    Posts:
    23
    ok, so I was able to get the controller working. I implemented the 'back' button to exit my demo.
    I also got the dpad working. The documentation says you can map it to Arrow keys, however this does not work. You must use the 5th and 6th axes and set them up properly in the Input settings inspector. I tried many variations to get the 'KeyCode.UpArrow' etc working, however, it was not working. Once I switched to the 5th and 6th axes, everything immediately worked fine.

    The next thing I am adding is some basic GUI code, controller by the dpad. I will post any insights I find.
     
  3. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    Which tv you have? Samsung?
    Also you telling me your using shield as a dev machine?
     
  4. Storyteller

    Storyteller

    Joined:
    May 15, 2012
    Posts:
    23
    I have a Magnovox '40ME324V', a 40" 120Hz 1080p tv.

    I am using the shield android tv console as my development platform. It functions as both dev platform and deployment platform.

    Right now, I can build a Unity, and use ES-FileExplorer to turn an FTP server briefly, copy my APK into the folder on my laptop that corresponds to that ftp and then install that APK using ES-FE and run it immediately. Its a very fast, iterative development cycle. The nice thing is, I can make gamepad/controller based games on my TV with minimal fuss. To me, this is a dream come true. No need for NDAs, expensive devkits or licensing agreements from the big manufacturers, just build, deploy, and play.
     
    MrEsquire likes this.
  5. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    Thanks im going to look into this, do you use plugin for controls?
     
  6. schmosef

    schmosef

    Joined:
    Mar 6, 2012
    Posts:
    852
    I've got a Shield Portable and I'm looking forward to getting a Shield Android TV when they show up at retail in Canada.

    I have a few Android devices and I really like using Unity Cloud Build because it makes it easy to test the APK on each device without having to connect a USB cable.
     
  7. Storyteller

    Storyteller

    Joined:
    May 15, 2012
    Posts:
    23
    Im building all of my controls nativly in unity using the recommended protocols described in the documentation.
    http://docs.nvidia.com/gameworks/co.../game_controller_unity_api_specifics.htm#DPAD

    the issue with using axes 5/6 for the dpad are in response to that article, I could not get the dpad to work mapped as arrow keys as it describes. There are some other pages in the documentation (that I dont have open right this moment) that cover things in a different fashion. They describe axes 5/6, as well as being required to setup the Input Inspector in the unity editor to map all of the nvidia controller (which follows the android tv controller specs).

    It is still a bit of a 'beta'. Nvidia is not real clear, android tv is still fresh. There is hope that Android M will streamline some of this. That said, I havent been this inspired in game dev in a long time.
     
  8. Grespon

    Grespon

    Joined:
    Apr 13, 2012
    Posts:
    388
    How do you install Unity on the shield ??
     
  9. schmosef

    schmosef

    Joined:
    Mar 6, 2012
    Posts:
    852
    You don't.

    You build your game for Android on a PC and transfer the resulting APK file to the Shield.

    Then use a file navigation tool to run/install it.

    I've got a Shield Android TV now and it's awesome.
     
  10. DomDomDom

    DomDomDom

    Joined:
    Jan 21, 2015
    Posts:
    43
    Stumbled across this GitHub page for gamepad support. Hope it helps!
     
    Kurt-Dekker likes this.