[NOOB] When developing on Unity, when does C#/JAVA/C++ take part?

SweetIndiesSweetIndies Posts: 2Member
1) I'd like to know and undertstand when and how each of this parts takes place when developing with Unity.

2) So if I have a full developed game in Unity what should my Ouya porting process be?

That's all.

Best Regards. 

Comments

  • Killa_MaakiKilla_Maaki Posts: 504Member
    edited July 2013
    1.) C# is 99% of all your scripting. Actually, in many cases (like in my case), it is likely 100% of your scripting. The Java part is used to communicate with the OUYA OS, but this has already been solved by the ODK so you likely won't have to even think about touching any Java code. C++ probably never even factors in.

    2.) First, you'll want to check out the Unity ODK (AFAIK it relies on the overwritten Input Manager). Figure out how to export the core packages, drop those in your project. Be careful, as this WILL overwrite your Input Manager. This is for a reason.
    I also recommend dropping in this community-created input manager: http://forums.ouya.tv/discussion/1678/new-ouyainput-controller-framework-simple-fast-with-documantation/p1

    This one lets you use Unity Input Manager-style method calls (GetAxis, GetButton, GetButtonDown, and GetButtonUp), but instead of button and axis names you pass enums which correspond to OUYA specific inputs (for example you could call GetButtonDown( OuyaButton.O ) to check if O button is pressed this frame). While it makes things a little harder to configure, this input manager completely makes up for it by automagically remapping between a wide variety of major controllers (OUYA, Xbox 360, PS3, etc).
    So you'll also want to replace your game's Input.Get[...] calls with OuyaInput.Get[...] calls. The cool part is this works on all platforms (not just OUYA)

    Additionally, you would add IAP to your game (for example, by giving the user some free levels and the rest are locked unless they've purchased the game).
    That should be about it.
    Post edited by Killa_Maaki on
    You didn't remember the plot of the Doctor Who movie because there was none; Just a bunch of plot holes strung together.
  • tgraupmanntgraupmann Posts: 2,869Administrator, Team OUYA
    And then you can write Java in the OuyaUnityApplication.java and UnityPlugin.java. The application is general activity stuff. You can call Java from your C# MonoBehaviours using the UnityPlugin.java. Java can invoke C# with send message through the public methods on OuyaGameObject.

    And then you can write C++ in the JNI and compile via NDK.
    ~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].
  • SweetIndiesSweetIndies Posts: 2Member
    Thanks guys :)
Sign In or Register to comment.