Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Question HealthBar Max size increase question

Discussion in 'UI Toolkit' started by DavidPaulinus, Aug 5, 2023.

  1. DavidPaulinus

    DavidPaulinus

    Joined:
    Dec 26, 2017
    Posts:
    2
    So, I'm currently learning how to use UI and already learned how to make a basic health bar using sprites or the default image. But I want to increase the bar size with the maximum life from the player using a sprite as a base.

    I tried to play around with the Rect Transform and I sort of got it working, but it was a mess to use, and not really good. Just messing with the values broke the thing up. I tried breaking the bar in different parts manipulating just the middle and adjusting the end position accordently. But it also got a mess.

    So, is there a better way to make it? Or just a tutorial that I could follow?
    Any tip is very welcome.

    Thanks.