Gamepad Cursor with Input System - Unity Tutorial @samyam
Gamepad Cursor with Input System - Unity Tutorial  @samyam
Uploaded October 2021 | Updated November 2026, 1 day ago
Make a custom gamepad cursor using Unity's New Input System. This way you can navigate UI using a controller similar to a mouse.

ᐅGet the full Source Code Bundle to my Unity Tutorials 🤓
sam-yam.itch.io/samyam-full-source-code-to-all-videos

📥 Get the Source Code 📥
patreon.com/posts/57282387

🤝 Support Me 🤝
Patreon: patreon.com/samyg
Donate: ko-fi.com/samyam

Thanks GeekZebra for helping make this video possible!
*Sorry for the desk noises, the mic is really sensitive and setting the controller up and down is not helping.

►🔗 Relevant Video Links 🔗
ᐅ Virtual Mouse Input System Documentation
docs.unity3d.com/Packages/com.unity.inputsystem@1.1/api/UnityEngine.InputSystem.UI.VirtualMouseInput.html
ᐅ Kenney - Crosshair Pack
https://www.kenney.nl/assets/crosshair-pack

In this video I show you how to make a gamepad virtual mouse cursor that can navigate around the scene and interact with the UI. This works with the new input system, any canvas scale and canvas type, the PlayerInput component, and you can adapt it further to fit your needs easily.

We use a gamepad or controller and pipe the input to a Virtual Mouse in the Input System. In our Input Action Asset UI map (created from the PlayerInput component), we add actions for the position and click of the Virtual Mouse. That input action asset is used in the Event System to replace the system mouse values.

Disclosure: This post may contain affiliate links, which means we may receive a commission if you click a link and purchase something that we have recommended. While clicking these links won't cost you any money, they will help me fund my development projects while recommending great assets!

😎 Other Cool Unity Assets 😎
ᐅPeek - Editor Toolkit: assetstore.unity.com/packages/tools/utilities/peek-editor-toolkit-149410
ᐅEditor Console Pro: assetstore.unity.com/packages/tools/utilities/editor-console-pro-11889
ᐅRainbow Folders 2: assetstore.unity.com/packages/tools/utilities/rainbow-folders-2-143526

►⏱️ Timestamps ⏱️
0:00 Intro
0:38 Install Input System
1:07 Gamepad Cursor Samples
1:57 Set up Scene
2:44 Create Cursor UI Image
4:27 Gamepad Cursor Script
19:51 PlayerInput and Input Action Asset
22:46 Debugging & Fixes
24:38 Preview working
25:40 Add Cursor Padding
26:40 OnControlsChanged Switching Between Mouse & Gamepad
33:28 Quick Null Reference Errors Fix
33:55 ScrollView Preview
34:18 Outro

💖💖THANK YOU TO ALL MY PATRONS 💖💖

❯❯❯ My Links ❮❮❮
💗 Patreon 💗
patreon.com/samyg
💬 Discord Server 💬
discord.gg/SwCKB3Q
🐦 Twitter 🐦
twitter.com/samyam_utube
📚 Facebook 📚
facebook.com/samyam.youtube
🎵 Music 🎵
Ambient Gold
streambeats.com
👍 Like and Subscribe! 👍

🖥️ Computer Setup 🖥️
*As an Amazon Associate I earn from qualifying purchases.
amazon.com/shop/samyam

#madewithunity #gamedev #unity
Gamepad Cursor with Input System - Unity Tutorialwhy so many games have this combat systemi paid Fiverr devs to make the same game in Godoti make games, of course #gamedev #indiegameHow GTA6 designed a new way to animate its charactersAttending a Game Developer’s Conference Was More Fun Than I Expected #gamedev #unity3d #indiegameGet Inspiration For Your Next Unity Gamei hired Fiverr devs to take turns making one Unreal gamechoosing a game engine is easy, actuallyreleasing my game the same week as GTA6 #indiegame #gamedevThey said my game was BORING… #gamedev #indiegamethis indie game will surprise you #indiegame #gamedev
samyam |

Gamepad Cursor with Input System - Unity Tutorial

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER