Learn how to create an auto resize slider based on the space around it! You will also learn how to get and set values either by script or through a UnityEvent. I also cover how to play a sound once you release the handle of the slider.
A slider has a different usecase than a health bar or resource bar. You would use an image for those, as they are purely to show information, not let the player interact with it. A slider is there to offer interaction.
📖 Chapters
00:00 This is what our resulting slider will look and sound like
00:19 Using a slider for a resource or HP bar
00:41 How to create a UI slider in Unity
01:24 How to make a slider auto resize
01:46 How to create a vertical slider
02:26 The Unity slider component
04:29 Customizing the slider
06:15 How to get the slider value through a Unity Event
07:17 How to get the slider value by script
08:16 How to play a sound at the end of interaction
📁 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