Skip to content

Instantly share code, notes, and snippets.

@sim2kid
Last active October 21, 2024 19:48
Show Gist options
  • Save sim2kid/0fdf296e9654bbc0267ea530642d7fa9 to your computer and use it in GitHub Desktop.
Save sim2kid/0fdf296e9654bbc0267ea530642d7fa9 to your computer and use it in GitHub Desktop.
Google Stadia Controller Support in Unity's New Input System (1.2+) With full button mapping. Haptics not supported. You should be able to drag and drop this in your project for Stadia controller support

Unity Stadia Controller Input

This gist has been moved to a repo for better maintainability. Please visit sim2kid/UnityStadiaController for package details and installation.

About

This package adds definition for the Google Stadia Controller to Unity's Input System allowing for the use of a Stadia Controller natively with Unity.

@Loufouh
Copy link

Loufouh commented Mar 29, 2023

Thanks! 😁

I've noticed that after turning a Stadia controller into bluetooth mode, it works natively with Unity!
(See https://stadia.google.com/controller)

With your scripts, it will display explicit names for the buttons and sticks though.

@StephanSchue
Copy link

Great job. Works perfectly fine for me. My Stadia Bluetooth Controller wasn't detected before, not even as a Generic Gamepad.

@jacobmrhodes
Copy link

This worked perfectly out of the box. Thanks man!

@ChettoZzz
Copy link

Great job. Thank you!

@CoderTobi
Copy link

Thanks a lot. Only one thing:
I had to add using UnityEngine.InputSystem.Controls; to StadiaController.cs

@sim2kid
Copy link
Author

sim2kid commented Aug 23, 2024

Thanks a lot. Only one thing: I had to add using UnityEngine.InputSystem.Controls; to StadiaController.cs

Thanks for the catch. I'll update the file.

@CoderTobi
Copy link

Thanks for updating the file.
I just upgraded my project to 2022.3.50f and now my Stadia Controller has stoped working. My PS4 Controller still works and the Stadia Controller is still recognized in the logs when disconnecting or connecting it. But I can't join a game. Has anyone got a similar problem? Since Unity isn't showing any errors, I am kind of unsure where to start.
I tried upgrading the input system from 1.10.1 to 1.11.1 but it didn't make any difference.

@sim2kid
Copy link
Author

sim2kid commented Oct 21, 2024

@CoderTobi This package has been moved to this repo. If you are still having issues, please open up an issue there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment