How to create a UI Inventory Button in Unity

Published: 24 March 2025
on channel: Christina Creates Games
810
70

Learn how to create an inventory slot for an inventroy system in this tutorial. It is basically a button with three modes: An action to perform on click, one on hover, a third on double click. This can be used for a lot of different use cases, but you will most likely primarily use it in an inventory system. This works with the new input system and on mouse input as well as controller input.

This tutorial covers:
Creating a new type of button especially suited for inventory systems
Handling three kinds of events: On left click, on double click and on hover (enter and exit)

Hope you'll enjoy it!

💬 Discord 💛
You are very welcome to join!   / discord  

📖 Github
Find my scripts here: https://github.com/Maraakis/Christina...

💸In case you'd like to support what I do
https://ko-fi.com/christinacreatesgames

🛍️ Affiliate links 🛍️
If you'd like to support my channel, please use my affiliate links when buying cool stuff:
My favourite assets I install by default into every project: https://assetstore.unity.com/lists/hi... [affiliate]
Unity Asset Store: https://assetstore.unity.com/?aid=110...
Synty Store: https://syntystore.com/christinacreat... [affiliate]

🌟 Need help with your project's UI?🧠
I have been a designer for more than 15 years, a teacher for three and I offer paid consulting for your project! You can find all the information here:
https://www.vennegerts.com/gamedevelo...
I am looking forward to hearing from you 💛

🎮 Play my games on Itch.io 🎮
https://christinacreatesgames.itch.io


📖 Chapters
00:00 Use case: an inventory system
00:55 Setup in the Unity inspector
01:39 Creating the inventory button
06:26 Finishing the setup in the Inspector
06:45 Turn the inventory slot into a prefab to add it to the right click menu


Watch video How to create a UI Inventory Button in Unity online, duration hours minute second in high quality that is uploaded to the channel Christina Creates Games 24 March 2025. Share the link to the video on social media so that your subscribers and friends will also watch this video. This video clip has been viewed 810 times and liked it 70 visitors.