Close
Advertise Here
Page 1 of 2 12 LastLast
Results 1 to 10 of 17
  1. #1


    Ouya Unity SDK and Controller Errors

    Hello everyone,


    Because of the progress that had been made on the project I'm working on I was hesitant to upgrade the ODK since upgrading tends to bring with it tons of new frustrations. Yesterday I finally upgraded and immediately regretted it. After fixing various java errors that left my head spinning, I've got 60 compiler errors (of the same type) that I've not been able to figure out. To summarize them, they say:

    "Assets/Plugins/IOuyaController.cs(31,13): error CS0426: The nested type `KeyEnum' does not exist in the type `OuyaSDK'"

    That goes for the Ouyacontroller.cs file, Xbox360 controller, you name it. I looked in the OuyaSDK.cs file and sure enough, there's no mention of KeyEnum anywhere. I admit though, that after 15 hours of bug fixing maybe my brain is just too fried to see it.

    As an experiment, yep, I did at one point delete all the files throwing errors, and that did remove the warnings, but unsurprisingly that gave me zero controller use.

    Incredibly frustrated, since this project is so close to release. Had one thing to implement that the new ODK was required for. (at least I hope. Will be incredibly upset if that thing isn't fixed by the upgrade, but we'll see)

    On the old ODK, my Unity controller inputs just worked. I would love to go back to that simplicity. At the very least, I'd like to get rid of the errors. Sorry if this has something that's been covered, I've been searching since yesterday and haven't found a direct answer anywhere, though it seems like I come close at times. Thanks, and God bless.
    "You can make a big impression or
    Go through life unseen
    You might wind up restricted and over seventeen
    It's so hard to be careful, so easy to be lead
    Somewhere beyond the pavement
    You'll find the living dead
    Dancin' at the Zombie Zoo...
    "

    ~Tom Petty

  2. #2


    Hey Disintegration Games,

    I wonder if anything mentioned in this thread would help you? http://ouyaforum.com/showthread.php?12757-Unity-4-5

    Or any of this documentation? https://github.com/ouya/docs/blob/ma...where-unity.md

    I don't use Unity, so I can't be too much of help, but I wish you all the best in sorting out your issues.
    Last edited by Sitting Fox; 07-17-2014 at 01:29 PM.
    "Be the change you wish to see."

  3. #3


    Quote Originally Posted by Sitting Fox View Post
    Hey Disintegration Games,

    I wonder if anything mentioned in this thread would help you? http://ouyaforum.com/showthread.php?12757-Unity-4-5

    Or any of this documentation? https://github.com/ouya/docs/blob/ma...where-unity.md

    I don't use Unity, but I wish you all the best in sorting out your issues.
    Hi Sitting Fox,

    Thanks so much for those. I had already been through the github docs, and unfortunately didn't see anything in there that helps with this issue, though went over again just in case.

    The Ouya forum post alludes to some of the Java issues I ran into when I upgraded, but fortunately got those straightened out. (those were a nightmare too, let me tell ya!)

    Like one of the posts in that thread stated, I too have been able to Skype with Tim, and he's been incredibly helpful. He's just away from the office until Monday, so I'm sitting on a project that needs about 3 minor updates and can be resubmitted to Ouya, and without this issue fixed I can do nothing with it. Beside, I don't want to treat him like my personal support guy. Reminds me of the Weird Al song "It's all about the Pentiums:" "I'm down with Bill Gates, I call him 'Money' for short. I phone him up at home, and I make him do my tech support!"

    Hey, that should be my new sig...
    "You can make a big impression or
    Go through life unseen
    You might wind up restricted and over seventeen
    It's so hard to be careful, so easy to be lead
    Somewhere beyond the pavement
    You'll find the living dead
    Dancin' at the Zombie Zoo...
    "

    ~Tom Petty

  4. #4
    OUYA Developer mhtraylor's Avatar
    Join Date
    Jul 2013
    Location
    Oxford, MS, USA
    Posts
    12


    Did you upgrade to the new "Ouya Everywhere" sdk for Unity? It looks as if your project has some of the deprecated Ouya Unity Plugin example files.

    EDIT: well, not necessarily "deprecated."
    Last edited by mhtraylor; 07-17-2014 at 10:03 PM. Reason: Add new info.

  5. #5


    Quote Originally Posted by mhtraylor View Post
    Did you upgrade to the new "Ouya Everywhere" sdk for Unity? It looks as if your project has some of the deprecated Ouya Unity Plugin example files.

    EDIT: well, not necessarily "deprecated."
    Hey mhtraylor,

    Yep, that's exactly what happened. When I upgraded there were still some files left behind. A reinstall of the new ODK fixed that issue.

    Except...

    Now all of my input mappings are gone. I mean, they EXIST within the Unity Input manager, I see them in the inspector in the editor, and can use them in a gametest on my pc. But now when I move over to the Ouya I have nothing, no controls whatsoever in my game. I read about mappings disappearing, but they still show up. Even redid them just in case, still nothing. I really hope I don't have to write 50,000 lines of code now to do what Unity did so easily. Sigh.
    "You can make a big impression or
    Go through life unseen
    You might wind up restricted and over seventeen
    It's so hard to be careful, so easy to be lead
    Somewhere beyond the pavement
    You'll find the living dead
    Dancin' at the Zombie Zoo...
    "

    ~Tom Petty

  6. #6
    OUYA Developer mhtraylor's Avatar
    Join Date
    Jul 2013
    Location
    Oxford, MS, USA
    Posts
    12


    Disintegration,

    Are you using Unity's Input class? The new sdk rolled out a custom input framework that is separate from Unity's Input. You can use both in a project, but you would wrap the Ouya/Etc specific input using some of Unity's compiler defines.

  7. #7


    Quote Originally Posted by mhtraylor View Post
    Disintegration,

    Are you using Unity's Input class? The new sdk rolled out a custom input framework that is separate from Unity's Input. You can use both in a project, but you would wrap the Ouya/Etc specific input using some of Unity's compiler defines.
    mh,

    See, that's where I think I'm getting confused. This is my first Unity (plus JS, C#) project, and while I've learned a lot over the past year, I'm still green in other areas. I have no idea how to even get started with the new framework. Unity's input manager was so simple, this I see there are some text tutorials, but either they're incomplete, or they're SO complete that my eyes glaze over before I get through the first page.
    "You can make a big impression or
    Go through life unseen
    You might wind up restricted and over seventeen
    It's so hard to be careful, so easy to be lead
    Somewhere beyond the pavement
    You'll find the living dead
    Dancin' at the Zombie Zoo...
    "

    ~Tom Petty

  8. #8
    OUYA Developer mhtraylor's Avatar
    Join Date
    Jul 2013
    Location
    Oxford, MS, USA
    Posts
    12


    That's ok, the documentation is indeed sparse. I'm not sure how much of the old plugin you were using, and that plugin was added onto piecemeal over the past year (such as the OuyaSDK.KeyEnum), other changes, etc. Basically, you'll use stuff like OuyaSDK.OuyaInput.GetAxis() instead of the Unity api, with some additional parameters added for multiple controllers of course. The ODK has new enumerations for all the buttons and axes defined by Ouya. Now, if you want to use your standard Unity input, say for testing in the editor or building to a different platform, you'll want to wrap the Ouya specific stuff in a conditional compilation definition block, i.e. within #if UNITY_ANDROID && !UNITY_EDITOR ... #endif. Have you browsed the examples on Ouya's official git repo? The new framework for the most part does closely follow the Unity api.

  9. #9


    The new ODK is a bit tricky with the #if UNITY_ANDROID && !UNITY_EDITOR tags.
    I had lots of problems, too, and I had to have a Tman session as well. My problem, mostly, that some old files were still there and not all of the new ones imported. Make sure, that all files from the new package are imported. But I guess if you don't have any errors, that's not an issue anymore.

    I'm not sure how to go about the input the best way, but I wrote a little wrapper class for myself to have an easy way to get the input values I need, either from keyboard (Unity) or controller(OUYA) input.

    Don't if it will help but if you want I can send you the class. It's not quite 100% clean of my game specific code, but I'll help out any way I can.
    Our game Black Hole - A Classic Arcade Dual-Stick Space Shooter
    Available in the OUYA store now!
    Killswitch - "There are 302,456 OUYAs out there, now no one will have to ask again."

  10. #10


    Quote Originally Posted by mhtraylor View Post
    That's ok, the documentation is indeed sparse. I'm not sure how much of the old plugin you were using, and that plugin was added onto piecemeal over the past year (such as the OuyaSDK.KeyEnum), other changes, etc. Basically, you'll use stuff like OuyaSDK.OuyaInput.GetAxis() instead of the Unity api, with some additional parameters added for multiple controllers of course. The ODK has new enumerations for all the buttons and axes defined by Ouya. Now, if you want to use your standard Unity input, say for testing in the editor or building to a different platform, you'll want to wrap the Ouya specific stuff in a conditional compilation definition block, i.e. within #if UNITY_ANDROID && !UNITY_EDITOR ... #endif. Have you browsed the examples on Ouya's official git repo? The new framework for the most part does closely follow the Unity api.
    Thanks Again, mh!
    I was trying to find the examples yesterday. When looking at the git, I only saw what appeared to be code. This is going to sound (and be!) Awfully Noobish, but what in the world do I do with that? If it was a scene, I'd think it would be some sort of download. This looks like I should copy and paste it somewhere.

    @Rhellik: I'd be so happy for any help. My head is completely spinning

    Tim has been great, but unfortunately (for me) he's away from the office until Monday, so my coder and I are trying to figure this out for two days. Very frustrating when the only reason we upgraded the ODK was to try and fix an entirely different issue that we have no idea if it got fixed by the update or not.
    "You can make a big impression or
    Go through life unseen
    You might wind up restricted and over seventeen
    It's so hard to be careful, so easy to be lead
    Somewhere beyond the pavement
    You'll find the living dead
    Dancin' at the Zombie Zoo...
    "

    ~Tom Petty

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •