This tutorial explains how to create a menu item (or multiple!) for the right click menu in Unity, with and without conditionals - and hotkeys. This is incredibly useful to speed up your game development time.
This tutorial is all about creating a menu item in the right click menu. It covers:
Setting up UI prefabs
Creating an Editor script
Configuring the menu item with a name, icon, and hotkey
Instantiating a prefab with proper parenting
Validating the selection to show the menu only under certain conditions
Hope you'll enjoy it!
📖 Github
Find my scripts here: https://github.com/Maraakis/Christina...
📖 Chapters
00:00 What a new menu item on right click will look like
00:45 Location of assets
01:21 The Editor script for the right click menu item entry
01:55 The attribute MenuItem explained
03:16 The body of the right click menu item script
04:55 Duplicating the script for more entries
05:10 Hiding the menu item under certain conditions
06:47 What else?
📁 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]
🟦 Amazon: https://amzn.to/3G8NgFq [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 #unitytips