Check out my 3rd Person Game Series Playlist teaching you how to make a 3rd Person game using Unity + Playmaker th-cam.com/play/PLhvjMi_0yrQwA0yAkta7hOS7x5zc1hMBr.html and if you would like to join my discord where I can help with issues or you can also engage with other developers please join discord.gg/DgUdNDT7KU - - - - The Script for the Animated UI Slider - - - - using UnityEngine; using UnityEngine.UI; public class AnimatedTimerSlider : MonoBehaviour { public float timerDuration = 30f; public Slider timerSlider; float timer; void Start() { timer = timerDuration; } void Update() { timer -= Time.deltaTime; // Animate timer from 1 to 0 float normalizedTime = Mathf.Clamp01(timer / timerDuration); // Update slider timerSlider.value = normalizedTime; if(timer
I just created it myself. You can create in any design app (illustrator, photoshop, etc...). Just create a circle with a line and no fill. Then you can export as a PNG and then import that into Unity.
Thanks for the tutorial!
Check out my 3rd Person Game Series Playlist teaching you how to make a 3rd Person game using Unity + Playmaker th-cam.com/play/PLhvjMi_0yrQwA0yAkta7hOS7x5zc1hMBr.html and if you would like to join my discord where I can help with issues or you can also engage with other developers please join discord.gg/DgUdNDT7KU
- - - - The Script for the Animated UI Slider - - - -
using UnityEngine;
using UnityEngine.UI;
public class AnimatedTimerSlider : MonoBehaviour
{
public float timerDuration = 30f;
public Slider timerSlider;
float timer;
void Start()
{
timer = timerDuration;
}
void Update()
{
timer -= Time.deltaTime;
// Animate timer from 1 to 0
float normalizedTime = Mathf.Clamp01(timer / timerDuration);
// Update slider
timerSlider.value = normalizedTime;
if(timer
Also check out my other tutorial series
Where did you download the hollow circle sprite? Looking for one for my game and I can't find a good one anywhere
I just created it myself. You can create in any design app (illustrator, photoshop, etc...). Just create a circle with a line and no fill. Then you can export as a PNG and then import that into Unity.
90% of the time, I was sure you were doing it with PM
Been trying to do some PM but others just general Unity.
Would've been a good idea to show the script. 🤔
using UnityEngine;
using UnityEngine.UI;
public class AnimatedTimerSlider : MonoBehaviour
{
public float timerDuration = 30f;
public Slider timerSlider;
float timer;
void Start()
{
timer = timerDuration;
}
void Update()
{
timer -= Time.deltaTime;
// Animate timer from 1 to 0
float normalizedTime = Mathf.Clamp01(timer / timerDuration);
// Update slider
timerSlider.value = normalizedTime;
if(timer
@@BlizStudio Thanks a lot. 😊
I always wondered how they made a cirlce slider lol