All-In-One Unity ODK Discussion

12467

Comments

  • tgraupmanntgraupmann Posts: 2,869Administrator, Team OUYA
    Coordinating patches and submissions will need to be part of the open source process. Makes sense.
    ~Tim Graupmann
    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].
  • Wurd-IndustriesWurd-Industries Posts: 43Member
    I'm pretty sure everything is set up correctly, but i'm still getting this error:

    Failed to compile Java code to DEX:
    /Users/Miguel/Documents/SkyRoads/Temp/StagingArea> dx --dex --verbose --output=bin/classes.dex bin/classes.jar plugins

    Then it lists a bunch of files.. any ideas?
  • tgraupmanntgraupmann Posts: 2,869Administrator, Team OUYA

    I'm pretty sure everything is set up correctly, but i'm still getting this error:

    Failed to compile Java code to DEX:
    /Users/Miguel/Documents/SkyRoads/Temp/StagingArea> dx --dex --verbose --output=bin/classes.dex bin/classes.jar plugins

    Then it lists a bunch of files.. any ideas?

    Can you PM me the entire console log? Thanks.
    ~Tim Graupmann
    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].
  • tgraupmanntgraupmann Posts: 2,869Administrator, Team OUYA
    edited December 2012
    I should add that the OUYA panel right now expects your application.java name to stay named: OuyaUnityApplication.java where changing the name is not supported presently. Ideally the panel needs an object array field where the input java source files can be altered. Otherwise you'll have to build your own application jar.
    Post edited by tgraupmann on
    ~Tim Graupmann
    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].
  • GodlyPerfectionGodlyPerfection Posts: 140Member

    I should add that the OUYA panel right now expects your application.java name to stay named: OuyaUnityApplication.java where changing the name is not supported presently. Ideally the panel needs an object array field where the input java source files can be altered. Otherwise you'll have to build your own application jar.

    Does having OuyaUnityApplication as the application name have any visual effects? For example would we still be able to have the name of our game somewhere and not have it show up as OuyaUnityApplication to the consumer? Just curious.
    Aggro Tactics - A tactical strategy virtual board game built with Unity3D 4.0, designed around the concept of Threat/Aggro inspired by the mechanics of chess and a customizable party like in table top games.

    Founder of ReachingPerfection.com
  • tgraupmanntgraupmann Posts: 2,869Administrator, Team OUYA
    I think that's actually the product name in the settings that changes the title. And that could be a supported enhancement to change the name.

    You can always search and replace the "OuyaUnityApplication.java" name if you wanted to change it.
    ~Tim Graupmann
    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].
  • Abyss-DoDAbyss-DoD Posts: 7Member
    AngryAnt said:

    For non-web IRC clients, the Unity channel is irc.freenode.net#Unity3D - anyone know if there's an OUYA IRC channel somewhere?

    AngryAnt got it right of course, sorry so used to be on EFNet on the old days, don't listen to me ;)
  • AyrikAyrik Posts: 429Member
    I just wanted to let you know that I got rid of the delay once and for all! The BUTTON_DPAD_CENTER message was being called several times per frame, and is seriously the most pointless message I've ever seen, so I commented out the dispatching of it in OuyaGameObject.cs. Maybe in the official ODK version, have an inspector bool whether to dispatch this one and default it to false.

    Also, if you just copy the Xbox 360 controller case, and paste a new "OUYA Game Controller" case, all the buttons and axes are mapped perfectly except the D-Pad. To get that working, you need to remove all the AxisHat checks, and simply add more KeyDown/KeyUp cases for numbers 19, 20, 21, 22--BUTTON_DPAD_UP, _DOWN, _LEFT, _RIGHT, respectively.

    Now all I need to figure out how to get rid of that giant panel that has my game name and icon on it and I'll be set for my OUYA "port" (of a game that's not even close to done).
    Saga Heroes - Adventure RPG
    image image
  • BalbiBalbi Posts: 198Member
    Good find Ayrik :) Let us know when you remove that top bar, it's getting annoying :D
    Lead Developer of Leroux
  • tgraupmanntgraupmann Posts: 2,869Administrator, Team OUYA
    The top bar should be controlled by Assets\Plugins\Android\res\layout\main.xml

    You should be able to use the Eclipse layout editor to make it "full screen".
    ~Tim Graupmann
    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].
  • BalbiBalbi Posts: 198Member

    The top bar should be controlled by Assets\Plugins\Android\res\layout\main.xml
    You should be able to use the Eclipse layout editor to make it "full screen".

    Thanks :) Just saved me a lot of effort hehehe. Could you add this to the docs?
    Lead Developer of Leroux
  • tgraupmanntgraupmann Posts: 2,869Administrator, Team OUYA
    edited December 2012
    There's a section in the docs:
    https://devs.ouya.tv/developers/docs/unity

    In the "Imported Files" section. A small comment, but I can expand the docs on it. Have you been able to convert it to fullscreen? When you do, the steps can be added to the docs.

    I have plans for a roadmap of documenting the process after you've imported the package. How you change the bundle identifier, what files need to change to support that. And maybe what to do if you already have a java project and how to integrate.

    It falls under Android programming, tweaking, and all that.
    Post edited by tgraupmann on
    ~Tim Graupmann
    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].
  • DreamwriterDreamwriter Posts: 768Member
    edited December 2012
    I got rid of the title bar - in the Manifest XML file, there's a line starting with "Application", add this to it:
    android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
    Post edited by Dreamwriter on
  • GodlyPerfectionGodlyPerfection Posts: 140Member

    I got rid of the title bar - in the Manifest XML file, there's a line starting with "Application", add this to it:
    android:theme="@android:style/Theme.NoTitleBar"

    That's good to hear Dreamwriter. :) I REALLY hope my console comes in today so I can start tweaking things properly.

    Aggro Tactics - A tactical strategy virtual board game built with Unity3D 4.0, designed around the concept of Threat/Aggro inspired by the mechanics of chess and a customizable party like in table top games.

    Founder of ReachingPerfection.com
  • AyrikAyrik Posts: 429Member

    I got rid of the title bar - in the Manifest XML file, there's a line starting with "Application", add this to it:
    android:theme="@android:style/Theme.NoTitleBar.Fullscreen"

    I can confirm this worked for me as well. Thank you so much! :)
    Saga Heroes - Adventure RPG
    image image
  • tgraupmanntgraupmann Posts: 2,869Administrator, Team OUYA

    I got rid of the title bar - in the Manifest XML file, there's a line starting with "Application", add this to it:
    android:theme="@android:style/Theme.NoTitleBar.Fullscreen"

    You rock sir. I could add a presentation toggle to the OUYA panel for that one.
    ~Tim Graupmann
    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].
  • The_CraigThe_Craig Posts: 89Member
    Hi Guys,

    I've followed the docs to the letter but I'm having a few issues (my first proper Android project so bear with me).

    Setup all my paths to not be greyed out, seems fine.

    When I compile NDK I get this:

    [Results] elapsedTime: 1.070061 errors: C:/android-ndk-r8d/build/core/add-application.mk:128: Android NDK: WARNING: APP_PLATFORM android-14 is larger than android:minSdkVersion in ./AndroidManifest.xml

    output: "Compile++ arm : -ouya-ndk <= jni.cpp
    StaticLibrary : libstdc++.a
    SharedLibrary : lib-ouya-ndk.so
    Install : lib-ouya-ndk.so => libs/armeabi/lib-ouya-ndk.so

    UnityEngine.Debug:Log(Object)
    OuyaPanel:RunProcess(String, String, String, String&, String&) (at Assets/Ouya/SDK/Editor/OuyaPanel.cs:991)
    OuyaPanel:RunProcess(String, String, String) (at Assets/Ouya/SDK/Editor/OuyaPanel.cs:965)
    OuyaPanel:CompileNDK() (at Assets/Ouya/SDK/Editor/OuyaPanel.cs:277)
    OuyaPanel:Update() (at Assets/Ouya/SDK/Editor/OuyaPanel.cs:505)
    UnityEditor.EditorApplication:Internal_CallUpdateFunctions()

    The other thing is that Unity won't recognise my Ouya as a device, is there a way to install via an APK rather than build&run?

    I'm using Unity Free along with Android basic.

    Cheers

    Craig
  • tgraupmanntgraupmann Posts: 2,869Administrator, Team OUYA
    Make sure you've set the min android sdk version in the project settings.

    You should be able to run a shell. Go to the AndroidSDK platform tools folder and run "adb devices".

    The OUYA should be detected, otherwise you need drivers.

    If you are rooted, you can use wireless adb. And in that case you type:

    adb connect IPADDRESS
    ~Tim Graupmann
    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].
  • The_CraigThe_Craig Posts: 89Member
    Yeah adb isn't detecting the Ouya, any ideas what drivers I need and from where? I double checked the project settings and I can only change the API level to 14, not 16.
  • AyrikAyrik Posts: 429Member
    This is how I got my drivers working: http://forums.ouya.tv/discussion/comment/304/#Comment_304
    Saga Heroes - Adventure RPG
    image image
  • The_CraigThe_Craig Posts: 89Member
    Ayrik said:

    This is how I got my drivers working: http://forums.ouya.tv/discussion/comment/304/#Comment_304

    Awesome Ayrik, that worked for me thanks. The controller demo now builds and deploys to the device so thanks for the help :D.

    Is this the only way we can build at the moment? The application doesn't appear in the game or app section from the front end.
  • The_CraigThe_Craig Posts: 89Member
    The demo also appears to be detecting input according to the debug text but nothing is highlighting or reacting? Apologies for all the questions I do genuine appreciate the help.
  • AyrikAyrik Posts: 429Member
    edited December 2012
    In order for your game to be listed in games, put
    <category android:name="ouya.intent.category.GAME"/>
    inside the <intent-filter> section of the AndroidManifest.xml.
    The_Craig said:

    The demo also appears to be detecting input according to the debug text but nothing is highlighting or reacting? Apologies for all the questions I do genuine appreciate the help.

    Do this: http://forums.ouya.tv/discussion/comment/754/#Comment_754
    Post edited by Ayrik on
    Saga Heroes - Adventure RPG
    image image
  • DreamwriterDreamwriter Posts: 768Member
    edited December 2012
    Look up a few posts in this thread, Ayrik had the fix for the controls (the official OUYA controller isn't one of the ones programmed into the Unity ODK yet, you have to add it manually). To get your apps to show up in the game or app section of the Launcher, you have to add a line to the Android Manifest (which is in the Plugins folder in the Unity ODK), look here for what to add.

    Edit: Beaten!
    Post edited by Dreamwriter on
  • The_CraigThe_Craig Posts: 89Member


    Do this: http://forums.ouya.tv/discussion/comment/754/#Comment_754



    I tried this, it detects the controller correctly and lists it top center but I still get no reaction even from a 360 controller in both the editor on PC and on the Ouya itself.

    The console prints the following (on PC):

    JavaSetDeveloperId
    UnityEngine.Debug:Log(Object)
    JNI: Unable to find method id for 'setDeveloperId' (static)
    UnityEngine.AndroidJavaObject:CallStatic(String, Object[])
    obj_Activity = 0
    UnityEngine.Debug:Log(Object)
    JavaClass object = 0
    UnityEngine.Debug:Log(Object)
  • Wurd-IndustriesWurd-Industries Posts: 43Member
    OK! So I've got everything working almost perfectly, my game installs to the emulator flawlessly, however, for some odd reason my script to change to the next level for the first screen (my logo) doesn't seem to work, it just stays on my logo screen. This is my script:

    var secondsToChange: int;
    function Start(){

    yield WaitForSeconds (secondsToChange);
    Application.LoadLevel(Application.loadedLevel+1);
    }

    Then in the editor I have the seconds to change set to 6. Any ideas?
  • Wurd-IndustriesWurd-Industries Posts: 43Member
    Just another note, it seems to be only building my one scene, when I click build and run application it only shows that it builds scene 0, no others, WHAT AM I DOING WRONG?!?
  • The_CraigThe_Craig Posts: 89Member
    Are you sure you're adding all the scenes to the build list in the build settings? Also, did the samples work for you straight out of the box?
  • DreamwriterDreamwriter Posts: 768Member
    Sounds to me like you need to add all the scenes to Build Settings - open each scene, then go to File->Build Settings and press the "Add Current" button.
  • Wurd-IndustriesWurd-Industries Posts: 43Member
    Ya they are all added to the build list, the samples work fine, everything works fine but it just isn't adding my other scenes, only the current scene that I have open
This discussion has been closed.