how to use xbox controller?

Hey everyone!
I am making a game for a school project. I would love to use an xbox controller to play the game but I dont know how. I searched a lot but im starting to loose hope. I was wondering if anyone could help me!

P.S i tried everything with gameinputmanager, gameinputelement and gameinputdevice but i dont know how to use my controller!

thank you :slight_smile:

Have you tried the GameInput example?

Examples/Games/GameInputExample

Plug it in (USB?) before you run the project. Does it show up in the list?

Yes I tried the example but when I select any device, the app crashes. But my xbox controller is shown in the list.

You can try adding this line to the top of the ElementTimer.Action event handler to see if that helps with the crash:

If ElementList.ListCount <= 0 Then Return

I donโ€™t have a USB controller that is recognized by Windows, but my controller does display and show all the buttons on OS X.