In this tutorial, you will learn how to set up a UI Navigation by keyboard and gamepad in Unity. You'll see how to configure the Event System, adjust automatic versus explicit navigation and add simple code in case you want to constrain the user to certain menu parts or pick the next element to select when the player presses a button. Whether you're organizing a basic main menu or a more complex system, this step-by-step guide shows you how to create a user interface that behaves exactly as intended.
This tutorial is all about creating a functional UI your users can navigate by keyboard or controller. It covers:
The built-in Unity navigation system
Setting up an initial gameobject to highlight
Working with selectables
How to make a menu circle around
Working with explicit navigation vs automatic navigation
Pitfalls of automatic navigation
How to set an element to select by code
How to constrain a user to one menu/part of the UI
How to prevent de-selecting elements
Hope you'll enjoy it!
📖 Github
Find my scripts here: https://github.com/Maraakis/Christina...
📖 Chapters
00:00 The result of this UI Navigation Tutorial
00:23 Scene Setup
01:18 How to enable keyboard and controller input on UI
02:33 How to make a menu circle around (Explicit Navigation)
05:40 Fixing the order elements get selected in (Automatic Navigation)
08:27 How to set a selected element by code
11:14 How to disable deselecting elements
12:17 The result and where to go next
📁 Get the PDF Version of my tutorials
Would you rather read a book? I have a collection of eBooks on the Unity UGUI System here:
📘 Itch: https://christinacreatesgames.itch.io/
💬 Join the Discord
You are very welcome to join / discord !
🎮 Play My Games
🎲 https://christinacreatesgames.itch.io
🛍️ Recommended Assets
https://assetstore.unity.com/lists/hi... [affiliate]
📖 List of books all around Gamedev and Design I recommend: https://www.christinacreatesgames.com...
Otherwise, using my affiliate codes for these stores helps to support my channel:
🛒 Unity Asset Store: https://assetstore.unity.com/?aid=110... [affiliate]
🏪 Synty Store: https://syntystore.com/christinacreat... [affiliate]
🪸 Envato Elements: https://1.envato.market/ChristinaCrea... [affiliate]
🔖Humble Bundle: https://humblebundleinc.sjv.io/xLGLNR [affiliate]
🌟 Actionable UI Feedback for Your Game
I offer UI consulting for gamedev projects! With 15+ years of design experience and a background of a teacher, I’m here to help:
👉 Learn more: https://www.vennegerts.com/en/gamedev...
☕ Support Me on Ko-fi
If you enjoy the content and want to support my work:
💛 Buy me a cocoa: https://ko-fi.com/christinacreatesgames
#unitytutorial #unity3d #gamedev #indiedev