I've been fighting with the Ouya Unity interface for a couple of days now and I finally have it working with the default Unity sample (AngryBots). I thought I'd share my frustration and a couple of suggestions to make the API easier to digest:
1) Make a polling interface available without a GameObject.
Make an interface very similar to the OuyaInput interface, but put the stateful pieces on the Java side and allow polling for GetAxis, GetButton, etc. That will provide an interface that looks and feels like Unity's Input class and make it easy for newbies like me to understand.
2) Create IOuyaGameObject and RegisterGameObject to do asynchronous processing on demand.
Instead of having to use the OuyaGameObject in every scene, Create a static method called RegisterGameObject that will receive sendMessage async processing. The IOuyaGameObject interface will ensure that all of the required method names will be available. This will eliminate the "magic" that happens when you have the OuyaGameObject in every scene and the frustration that happens when you don't and you don't realize it (until you tear your hair out for 4 hours, then dive into logcat and find 3 rogue "OuyaGameObject not found" error message and finally decrypt them to come to the realization that there is some state sent via sendMessage in the first scene that if you don't catch, nothing works. >:{)
I'm new to Unity/Ouya but an old hat at Software Architecture. If I find the time and motivation, I'll attempt to implement these ideas and share repo. Until then, feel free to ignore this entirely if you don't agree (I might if I were in your situation)
Comments
OUYA Inc | Android Developer
Skype: tgraupmann_prey
http://github.com/ouya/docs
http://github.com/ouya/ouya-sdk-examples
Check out the latest docs for your game engine: [setup] [adobe air] [android] [clickteam fusion] [construct 2] [corona] [libGDX] [game maker] [html5] [marmalade] [monogame] [unity] [unreal]
Use caution when setting [persistent wireless mode].