Gamepad Cursor with Input System - Unity Tutorial @samyam
Gamepad Cursor with Input System - Unity Tutorial  @samyam
Uploaded October 2021 | Updated September 2026, 1 week 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, actuallyThey said my game was BORINGโ€ฆ #gamedev #indiegamethis indie game will surprise you #indiegame #gamedevComponents - How to make a game in Unity Pt. 5  #Shorts
samyam |

Gamepad Cursor with Input System - Unity Tutorial

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER