tgraupmann said:Some of the Create Contest Entries wanted to use a Quit button to completely exit their OUYA application.
Which way would you recommend?
Would you just call Application.Quit in Unity which might kill the Unity player and leave…
@tgraupmann The docs say that AndroidJavaClass/AndroidJavaObject are the highest-level JNI API that unity offers, and is more or less a black box. They implement a lot of caching, so if we want finer-grained control over persistence we probably need…
@Ayrik, cool! That's pretty good, sorry about the dup code, I think I probably just double-pasted it by mistake. I didn't know that it would keep the reference to the static var "live". However, if it's live access instead of making copies, don't we…
@yankijp My next step would be to make sure all the bundle identifiers match. Did you change it away from tv.ouya.demo.OuyaUnityApplication (which I think is the default)? If so, did you get it changed in AndroidManifest.xml, OuyaUnityApplication's …
@Jack_Mcslay I would actually prefer it if the OUYA would take care of mapping any controller that was plugged in, either through automatic detection or through a system setting. Would really reduce the headache of having to sniff and remap ourselve…
@yankijp, are you running on the actual device? None of the java-side stuff runs in the editor, so I usually wrap it with #if UNITY_OUYA && !UNITY_EDITOR and provide fallback to regular Unity Input in my own code.
On a larger scale, it would be great to find out if the ODK will map or provide a way for end users to map all joysticks to the OUYA controls, so that we only have to work through the OuyaController class (instead of everyone providing their own sup…
This is a known ODK bug, which they've said will be fixed in the next version. See http://forums.ouya.tv/discussion/404/controller-buttons-only-readable-through-onkeydown-and-onkeyup#latest
@Litteratus, check out the ODK javadoc documentation that comes along with the full ODK. I think that is accurate. But you need to import the OuyaController class to get to all of it too, which involves an import statement at the top of OuyaUnityApp…
After fiddling around with input a bit today, the game's 2000% tighter in terms of controls. Although I did convert over to JNI for input control, I also found big wins in getting rid of movement inertia and adjusting deadzones for my axes to 25%. I…
Okay, so I actually went about calling into JNI every frame with Unity's AndroidJavaClass / AndroidJavaObject helper classes, and it was actually really straightforward with a few hiccups.
First off, ODK OuyaController.getButton is broken for everyt…
@tgraupmann Doh. I only have the OUYA controllers, so it probably wouldn't be useful for me to try that if it means it wouldn't work with other setups. Did you file a bug with the Unity guys like @AngryAnt? It's probably something they would want to…
@Ayrik, that's a pretty cool solution, basically just wrapping the ODK OuyaController class directly.
Optimizing it further, one could imagine using badlogic's suggestion to fetch all axis/button values for a controller at once. From reading the JN…
@badlogic @tgraupmann I am willing to investigate doing doing this next week. I don't know a lick about JNI but it sounds doable. I've already invested a lot of time into poring over the Unity ODK for my own uses and will take a look when I have a c…
Dreamwriter said:
Note that this'll make it so your app quits when pressing Home, not pauses. Which personally I think should be the default action, since this is a game console, not a cell phone where you'll be pausing/resuming a lot
A…
EMcNeill said:
So, just to confirm, since I don't really understand most of the inner workings of these things: If I copy that pastebin code into my OuyaUnityApplication.java, this pausing bug will disappear?
I think you might need to re…
Ugh, also you'll need to change mUnityPlayer back to whatever the actual name is earlier in the file. I thought I renamed it back before pasting, but didn't catch that.
This is purely based on the code that Unity spits out if you pick the "Eclipse P…