All about the Unity Slider | Get set values by script, auto resize and more

Published: 27 January 2025
on channel: Christina Creates Games
753
54

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.

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

🛍️ 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]
Synty Store: https://syntystore.com/mh/christina

🌟 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

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

📖 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


Watch video All about the Unity Slider | Get set values by script, auto resize and more online, duration hours minute second in high quality that is uploaded to the channel Christina Creates Games 27 January 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 753 times and liked it 54 visitors.