NullReferenceException in OuyaInputManager

ChadivisionChadivision Posts: 3Member
Hi.  I'm having a problem getting the controller working on a Ouya Unity project.  As a test I created a script in unity that moves a cube around using the left stick.  My scene has the OuyaGameObject prefab in it, with the OuyaGameObject script attached.  I've got "Use Legacy Input" turned off.

To get the input, I'm calling OuyaInputManager.GetAxis("LX", OuyaSDK.OuyaPlayer.player1);  This works fine using my XBox 360 controller in the editor, but when I run it on the Ouya, Logcat says that I'm getting a NullReferenceException at line 400 of OuyaInputManager.cs.

That line looks like this...


switch (inputName)
{
...
case "LX":
    return OuyaInputManager.getPlayerKeyState(player).m_axisLeftStickX;
...
}


Any ideas?  Thanks

Comments

Sign In or Register to comment.