Change Log
Change Log: (1.0.3.11)
- Added xbox controller mappings on OUYA for Unity input
Testing OUYA Inputs Example:
using UnityEngine;
public class InputTest : MonoBehaviour
{
private void OnGUI()
{
GUILayout.Label(string.Format("FirePrimary: {0}", InputManager.GetAxis("FirePrimary", OuyaSDK.OuyaPlayer.player1)));
GUILayout.Label(string.Format("FireSecondary: {0}", InputManager.GetAxis("FireSecondary", OuyaSDK.OuyaPlayer.player1)));
GUILayout.Label(string.Format("Roll: {0}", InputManager.GetAxis("Roll", OuyaSDK.OuyaPlayer.player1)));
GUILayout.Label(string.Format("Vertical: {0}", InputManager.GetAxis("Vertical", OuyaSDK.OuyaPlayer.player1)));
GUILayout.Label(string.Format("Pitch: {0}", InputManager.GetAxis("Pitch", OuyaSDK.OuyaPlayer.player1)));
GUILayout.Label(string.Format("Vertical: {0}", InputManager.GetAxis("Vertical", OuyaSDK.OuyaPlayer.player1)));
GUILayout.Label(string.Format("Yaw: {0}", InputManager.GetAxis("Yaw", OuyaSDK.OuyaPlayer.player1)));
GUILayout.Label(string.Format("Afterburner: {0}", InputManager.GetButton("Afterburner", OuyaSDK.OuyaPlayer.player1)));
GUILayout.Label(string.Format("FirePrimary: {0}", InputManager.GetButton("FirePrimary", OuyaSDK.OuyaPlayer.player1)));
GUILayout.Label(string.Format("FireSecondary: {0}", InputManager.GetButton("FireSecondary", OuyaSDK.OuyaPlayer.player1)));
GUILayout.Label(string.Format("LinkPrimary: {0}", InputManager.GetButton("LinkPrimary", OuyaSDK.OuyaPlayer.player1)));
GUILayout.Label(string.Format("LinkSecondary: {0}", InputManager.GetButton("LinkSecondary", OuyaSDK.OuyaPlayer.player1)));
}
void FixedUpdate()
{
OuyaExampleCommon.UpdateJoysticks();
}
}
Change Log: (1.0.3.10)
- Added xbox controller mappings for the Windows Editor ShowUnityInput example
- Added 10 input axis mappings for project settings
- Added a console reboot button on the Android tab
Example Input mapping:
using System;
using UnityEngine;
public static class InputManager
{
public static float GetAxis(string inputName, OuyaSDK.OuyaPlayer player)
{
switch (inputName)
{
case "FirePrimary":
return OuyaExampleCommon.GetAxis("RT", player);
case "FireSecondary":
return OuyaExampleCommon.GetAxis("LT", player);
case "Roll":
return OuyaExampleCommon.GetAxis("LX", player);
case "Vertical":
return OuyaExampleCommon.GetAxis("LY", player);
case "Pitch":
return OuyaExampleCommon.GetAxis("RY", player);
case "Yaw":
return OuyaExampleCommon.GetAxis("RX", player);
default:
return 0;
}
}
public static bool GetButton(string inputName, OuyaSDK.OuyaPlayer player)
{
switch (inputName)
{
case "Afterburner":
return OuyaExampleCommon.GetButton(player, OuyaSDK.KeyEnum.BUTTON_O);
case "FirePrimary":
return OuyaExampleCommon.GetButton(player, OuyaSDK.KeyEnum.BUTTON_LT);
case "FireSecondary":
return OuyaExampleCommon.GetButton(player, OuyaSDK.KeyEnum.BUTTON_RT);
case "LinkPrimary":
return OuyaExampleCommon.GetButton(player, OuyaSDK.KeyEnum.BUTTON_LB);
case "LinkSecondary":
return OuyaExampleCommon.GetButton(player, OuyaSDK.KeyEnum.BUTTON_RB);
default:
return false;
}
}
}
Change Log: (1.0.3.7)
- Fixed issue with UnityPlayer.SendMessage crashing passing a null parameter in 4.X
Change Log: (1.0.3.6)
- Fixed input enum case for higher joysticks
- Added IAP error handling
- Only the Unity/IAP handshake initializes the OuyaFacade
Change Log: (1.0.3.5)
- Added: bool OuyaSDK.isIAPInitComplete();
- Check if IAP is initialized before getting products, receipts, or making purchases.
Change Log: (1.0.3.4)
- Fixed platform specific warnings
- Enhanced the geometry performance example
- Moved common example input code to a common class
Change Log: (1.0.3.3)
- Cleared some warnings
- Added a mesh performance example with FPS metrics
Change Log: (1.0.3.2)
- Upgraded the stable build to have the latest changes
- Upgraded to the ODK 1.0.3 JAR
Change Log: (1.0.3.1)
- Experimental: Has tweaks to the Android.manifest and OuyaApplication.java for testing, not for release
- Upgraded to the ODK 1.0.3 JAR
- Improved axis, button, fps plot speeds
- Added rendering, update metrics
Change Log: (1.0.2.2)
- Fixed Unity Input Controller Example mappings so the right controller goes to the right joystick.
- The JoystickButton1 enum is for all joysticks
- The Joystick1Button1 enum is for joystick 1 etc
Change Log: (1.0.2.1)
- Upgraded to the ODK 1.0.2 jar
Change Log: (1.0.1.11)
- Added MenuAppearing events
//Listener Setup
public class YourGameLogic : MonoBehaviour,
OuyaSDK.IPauseListener, OuyaSDK.IResumeListener,
OuyaSDK.IGetProductsListener, OuyaSDK.IPurchaseListener, OuyaSDK.IGetReceiptsListener,
OuyaSDK.IMenuAppearingListener
{
void Awake()
{
OuyaSDK.registerMenuAppearingListener(this);
OuyaSDK.registerPauseListener(this);
OuyaSDK.registerResumeListener(this);
OuyaSDK.registerGetProductsListener(this);
OuyaSDK.registerPurchaseListener(this);
OuyaSDK.registerGetReceiptsListener(this);
}
void OnDestroy()
{
OuyaSDK.unregisterMenuAppearingListener(this);
OuyaSDK.unregisterPauseListener(this);
OuyaSDK.unregisterResumeListener(this);
OuyaSDK.unregisterGetProductsListener(this);
OuyaSDK.unregisterPurchaseListener(this);
OuyaSDK.unregisterGetReceiptsListener(this);
}
public void OuyaMenuAppearing()
{
Debug.Log(System.Reflection.MethodBase.GetCurrentMethod().ToString());
}
public void OuyaOnPause()
{
Debug.Log(System.Reflection.MethodBase.GetCurrentMethod().ToString());
}
public void OuyaOnResume()
{
Debug.Log(System.Reflection.MethodBase.GetCurrentMethod().ToString());
}
public void OuyaGetProductsOnSuccess(List products)
{
Debug.Log(System.Reflection.MethodBase.GetCurrentMethod().ToString());
}
public void OuyaGetProductsOnFailure(int errorCode, string errorMessage)
{
Debug.Log(System.Reflection.MethodBase.GetCurrentMethod().ToString());
}
public void OuyaPurchaseOnSuccess(OuyaSDK.Product product)
{
Debug.Log(System.Reflection.MethodBase.GetCurrentMethod().ToString());
}
public void OuyaPurchaseOnFailure(int errorCode, string errorMessage)
{
Debug.Log(System.Reflection.MethodBase.GetCurrentMethod().ToString());
}
public void OuyaGetReceiptsOnSuccess(List receipts)
{
Debug.Log(System.Reflection.MethodBase.GetCurrentMethod().ToString());
}
public void OuyaGetReceiptsOnFailure(int errorCode, string errorMessage)
{
Debug.Log(System.Reflection.MethodBase.GetCurrentMethod().ToString());
}
}
Change Log: (1.0.1.10)
- IAP Purchase, send stored product for on purchase success event if detected.
Change Log: (1.0.1.9)
- Input workaround: Pipe Java OnGenericMotionEvents through touch inputs to get axises to show in Unity native input API
- Upgraded NDK references to ndk_r8e
Change Log: (1.0.1.8)
- SetResolution example now calls Java code to change the layout size
- SetResolution example mouse clicks work after resolution change
Change Log: (1.0.1.7)
- Added missing OuyaKeyCodes
- Added support for input settings on Unity 4.2
Change Log: (1.0.1.6)
- Added new example ShowUnityInput script and scene
- Added support for non-legacy mode in the OuyaGameObject (just uncheck)
- Supports the Unity API for detecting Input. button events so far
- Axis support in progress
- Performance enhancements using non-legacy mode
Change Log: (1.0.1.5)
- Removed UseIAPTestMode
Change Log: (1.0.1.4)
- Actually use the developer id!
Change Log: (1.0.1.3)
- Added purchase listeners for success and failure
Change Log: (1.0.1.2)
- Added OuyaJava Receipts interface
- Added Open Android SDK to Android tab
- Updated IAP interface to support the following:
// Basic Setup
public class OuyaShowProducts : MonoBehaviour,
OuyaSDK.IPauseListener,
OuyaSDK.IResumeListener,
OuyaSDK.IGetProductsListener,
OuyaSDK.IPurchaseListener,
OuyaSDK.IGetReceiptsListener
{
void Awake()
{
OuyaSDK.registerPauseListener(this);
OuyaSDK.registerResumeListener(this);
OuyaSDK.registerGetProductsListener(this);
OuyaSDK.registerPurchaseListener(this);
OuyaSDK.registerGetReceiptsListener(this);
}
void OnDestroy()
{
OuyaSDK.unregisterPauseListener(this);
OuyaSDK.unregisterResumeListener(this);
OuyaSDK.unregisterGetProductsListener(this);
OuyaSDK.unregisterPurchaseListener(this);
OuyaSDK.unregisterGetReceiptsListener(this);
}
public void OuyaOnPause()
{
}
public void OuyaOnResume()
{
}
public void OuyaGetProductsOnSuccess(List products)
{
}
public void OuyaGetProductsOnFailure(int errorCode, string errorMessage)
{
}
public void OuyaPurchaseOnSuccess(OuyaSDK.Product product)
{
}
public void OuyaPurchaseOnFailure(int errorCode, string errorMessage)
{
}
public void OuyaGetReceiptsOnSuccess(List receipts)
{
}
public void OuyaGetReceiptsOnFailure(int errorCode, string errorMessage)
{
}
}
// Requesting product list, put into a button handler etc
List productIdentifierList = new List();
foreach (string productId in OuyaGameObject.Singleton.Purchasables)
{
productIdentifierList.Add(new OuyaSDK.Purchasable(productId));
}
OuyaSDK.requestProductList(productIdentifierList);
// Requesting a Purchase in a button event
OuyaSDK.Product product = m_products.Find((p) => { return p.identifier == "YOUR_PURCHASABLE_ID"; });
OuyaSDK.requestPurchase(new OuyaSDK.Purchasable(product.getIdentifier()));
// Using the callback to get the price
public void OuyaGetProductsOnSuccess(List products)
{
m_products = products;
OuyaSDK.Product product = m_products.Find((p) => { return p.identifier == "Gravi_Unlock_Demo"; });
ButtonLabel.text = string.Format("Unlock for ${0:F2}", product.getPriceInCents() / 100f);
}
ODK 1.0.1 - Mar 21, 2013
========================
- The console USB VID/PID has changed. ADB will not work until you edit your adb_usb.ini file. Please see https://github.com/ouya/docs/blob/master/setup.md
Change Log: (1.0.0.3)
- Added preprocessor defines so that Unity 4.X can use the menu OUYA->Use Ouya Input Settings
- Added L3 and R3 button pressed to ShowController example
- Fixed missing button down events for xbox 360 joystick for L3 and R3 down events
- Controller fixes
Change Log: (1.0.0.2b)
- Made compatibility fixes for Unity 4.X
- Essentially 4.X exploded when sending a message to Unity during startup
- Are you awake Unity player.... BOOM!
- Also a fix for the OuyaGameObject singleton property to work in 4.X
- Above fix also caused... BOOM!
Change Log: (1.0.0.2)
- Added download links in tabs for Unity3d/JDK/Android SDK/Android NDK
- Added links to main OUYA panel for quick updates and subscription, docs, etc
- IAP changes: Connected OuyaGameObject purchasables with Java Plugin and OuyaFacade
- IAP changes: Connected OuyaGameObject UseIAPTestMode to Java OuyaFaacade
- IAP changes: Added debug logging functions and tests to ShowProduct example
- Added SetResolution example
- Exported Core, Examples and Starter Kit
Change Log: (1.0.0.1)
- Upgraded to ODK 1.0.0
- Added Run Application Button
- Added Product List field to OuyaGameObject
- IAP in progress
- Controller performance in progress
- Updated documentation
Change Log: (0.0.6.3)
- Added Starter Kit (separate package)
- Updated documentation (OUYA_Unity_Package.pdf)
Change Log: (0.0.6.2)
- Added partial bluetooth support for OUYA controller in the Unity Editor on Windows and Mac (unverified).
- Added minSDK version in the Android manifest
- Added custom axis inverts for OUYA bluetooth on non-android device types
- Updated version in OUYA panel to 0.0.6.2
- Added playerNum to Devices, which uses: OuyaController.getPlayerNumByDeviceId(d.getId())
- Added runtime platform detection to OuyaGameObject
- Misc fixes
Change Log: (0.0.6.1)
- Added OUYA Panel validation when compiling plugin and java application, when there's an error the compile stops and prints an error
- Added a functional sync button that will auto change the android manifest and java application to match the bundle id
- Configured the C++/Java post processor to be off by default, stores preference in editor prefs
- IAP support fixes for purchase example (currently GetProducts works again), still working on purchases and receipts.
- Changes to the IOuyaActivity structure to make the activity and bundle accessible to the plugin
- Changes to the IOuyaActivity structure to make the TestFacade accessible to the java application
- Changes to the Java Application to use IOuyaActivity as a proxy to the plugin
- Changes to the plugin to use IOuyaActivity as a proxy to the java application
- Changes to the TestOuyaFacade to mirror the iap-sample-app changes
- Upgraded to ODK SDK Jar for 0.0.6
Change Log: (0.0.5.1d)
- Added OUYA menu items to open links for JDK, NDK, SDK, Unity downloads, FAQ, Videos
- Added "Sync" button to the panel to automatically set your bundle identifier in the manifest and application java package names.
- Added OUYA Panel warning if your NDK is not patched
- Added OUYA Panel warning if your OuyaGameObject is missing the developer id
- Added version number to error logs
- Added version number to OUYA panel
- Added LS and RS controller animation
- Fixed L3 and R3 mappings for XBOX 360 controller on Unity IDE
- Added better deadzone support for LS and RS.
- Added scene switching example
(This will have to be behind a "Validate" button since it has to switch scenes)
- Add warning if your first scene is missing an OuyaGameObject
- Add warning if subsequent scenes have a duplicate OuyaGameObject
Change Log: (0.0.5.1)
- Min Android SDK: 16
- Detect controller changes while the game is running
- Added placeholder onPause and onResume events on the Java side
- Added Unity IDE support for Controllers in Android and Standalone mode
- Added automated setup of IDE controllers via menu items
- Added Unity IDE simulate of Java input events
- Moved Input Listener Setup to OuyaGameObject so you don't have to
- Added don't destroy on load for OuyaGameObject so you only need to add to your first loaded scene
- Added developer id to the OuyaGameObject fields so you can enter it in the inspector and save with your scene
- Put log statements under a boolean toggle on the OuyaGameObject to avoid accidental leaving logging statements on in the build and destroying performance. By default debugging is off.
- Added a border around the multiple controller example so your skeleton doesn't fall off the world and die
- Changed NGUI Free to NGUI Distributed
- Added platform checks to compile on non-Android platforms
- Split OuyaSDK package into different core and example packages
- Fixed button mappings for controller in Unity IDE
- Added thumbstick button events
- Added Java Post Processor (which auto compiles the Plugin and Application java if a Java change is detected)
- Added C++ Post Processor (which auto compiles the NDK if a C++ change is detected)
- Disabled IAP
- Added configuration validation
- Save Java App name and APK name in editor preferences
|