Master Controller Program Activated: Input Domination Achieved!


I just finished up setting up controller support for my game! I was expecting the process to be a bit more involved, but thanks to Unity's new Input System, it was surprisingly smooth. It practically worked straight out of the box. In no time, I had my character moving under full controller control. I was controlling time with my controller like it was the remote from click!

However, I wanted more than just basic movement support. I aimed for full controller integration—no mouse required. I wanted the entire game to be fully playable with a controller alone. This would also future-proof the project in case I decide to port it to consoles later.

I had already configured the UI and navigation to work with a mouse. My initial thought was to control the mouse cursor using the controller—a seemingly simple solution. However, this quickly proved to be more complicated than anticipated. Setting up player movement was easy, but controlling a mouse with a controller introduced several challenges.

The common approach involves creating a custom cursor controlled by the controller. This led to a new problem: two cursors on screen. I had to hide the system cursor and replace it with the custom one. However, my mouse input setup was already functioning well, and I didn't want to touch those systems again.

Then I thought, most console games bypass the mouse entirely. They allow controllers to navigate buttons directly. Unity's Input System supports this approach and, in theory, it is easy to implement. But, no matter what I tried, the controller navigation did not work.

I found out that you must manually select the initial button to activate navigation. This must be the missing piece! I was so excited! I implemented the code and excitedly tested it.. and nothing! Still!

I furiously moved my thumb sticks and mashed the d-pad! Nothing! Then, I pressed button, and it activated a UI button!—but not the highlighted button. What was going on?

Although my first button was highlighted, it was not selected. The mouse highlights buttons, but Unity's navigation system doesn't highlight buttons it selects them, so I needed to set a selection colour. 

The controller navigation was working the whole time! there was just no visual indication of it. Once I made this change, everything worked as expected.

While the setup process was ultimately straightforward, these small nuances led to some frustration. Record Rewind Repeat now has full controller support and an added bonus of setting up the navigation with the controller is that I can now navigate the UI with the keyboard! I'm so happy to get it all working! Onto the next development task! See you in the next devlog.

Get Record, Rewind, Repeat

Buy Now$12.99 USD or more

Leave a comment

Log in with itch.io to leave a comment.