How do I get input from the WiiU Gamepad

Hello everybody

i’m new here. So I got a Wiiu here and its all working fine with the game loading on it and starting and so on, but I got a little bit of a problem when it comes down to the gamepad controlls.

It just wont work no matter what I do.

I dont get any Input from this.

I was able to switch the analog sticks for the movement in the InputManager
and with Input.getButton(“Fire1”) it seems that “joystick button 0” is the touchscreen,
but the other Options “joystick button 1 - 19” have no effect.

Ok i managed to solve this problem by creating the “myDrc”-Variable in one of the Update Methods.

Can somebody explain to my why the Wii U Gamepad needs to be assigned to that variable every frame?

Hi, could you post new code for this script? I also want to know why.

Before I answer your question, may I ask you something?
Why do you put stuff in public view that’s covered under NDA?
All Wii U-related stuff is part of the NDA, which is why the public editor doesn’t show it.
It’s safer to put this kind of questions on the newsgroups next time, you’ll save yourself from getting your license revoked with this.

More generally spoken, FixedUpdate() is meant to be used for physics purposes only, pressing buttons on a controller, keyboard, joystick or mouse is not an in-game physic. I used to make this mistake in the past too, which caused a lot of trouble with input. So instead of that, put all your controls in Update(), this will fix it automatically.

One other tip:

I see you’re using a string value for debug purposes. It’s much easier to use Debug.Log("SOMETHING"); instead. It’s less typing and it will also work when running it on the dev kit. Where? You will find it out quick (and I won’t say it in public).