How to Create a Health Bar (Unity Tutorial | 2D Top Down Shooter)

Поделиться
HTML-код
  • Опубликовано: 24 янв 2025

Комментарии • 23

  • @NicAnimation
    @NicAnimation 9 месяцев назад

    Do you have any idea to make OnDied() without the invoke, for me invoke seems disadvantages when you lost your script or etc and you have to manually set them back again

  • @aleksandraaleksandra7934
    @aleksandraaleksandra7934 Год назад +2

    It's funny : a few days ago I was doing a review of tutorials on this topic. I thought it's a pity you don't have such a tutorial, and today I get a notification about this video. The universe favors me!

    • @KetraGames
      @KetraGames  Год назад +1

      Great to hear, thanks 😊

  • @felipemeridareinaga
    @felipemeridareinaga 3 месяца назад

    if the player moves and i have a script that makes the camera follow the player, will the ui move with the camera?

  • @VodkaMan699
    @VodkaMan699 Год назад +1

    Amazing ketra but I have on question how can we make the health bar smoother?

    • @KetraGames
      @KetraGames  Год назад +1

      Hi @VodkaMan, exactly as @visitor_t suggested. Instead of changing the FillAmount immediately you could store the current FillAmount and the target FillAmount. Then you could add an Update method and use Lerp or MoveTowards to gradually change the value from the current FillAmount to the desired FillAmount. Hope that helps 😊

  • @blueytg6026
    @blueytg6026 Год назад

    I can't find the square sprite anywhere, even after toggling the packages visibility icon. How do I get it?

    • @DemonMachine12
      @DemonMachine12 11 месяцев назад

      when making the project, you need to select URP2D instead of 2D

    • @brayneldelrio7044
      @brayneldelrio7044 11 месяцев назад

      @@DemonMachine12 dang that duded messed up bad

    • @DemonMachine12
      @DemonMachine12 9 месяцев назад

      your right to be honest@@brayneldelrio7044

  • @ismaileyupozgen4940
    @ismaileyupozgen4940 Год назад

    Nice tutorials thank you guys so much and when will you uploud the new video?

    • @KetraGames
      @KetraGames  Год назад

      Thanks. New video coming in the next few days 😊

  • @mrgoodkat1135
    @mrgoodkat1135 Год назад

    Greetings! Thanks for the cool lessons! I came across such an error - when a player dies, the health bar does not decrease completely, the fill amount parameter in the inspector remains at 0.1. Tell me how can I fix it?

    • @DemonMachine12
      @DemonMachine12 11 месяцев назад +1

      update the health bar on death

  • @30fpsprohere
    @30fpsprohere Год назад

    Can we add animations in health Bar and how

    • @KetraGames
      @KetraGames  Год назад

      Hi, you could use Lerp or MoveTowards to smoothly move the health bar. Hope that helps 😊

  • @George-uv7wt
    @George-uv7wt Год назад +2

    ty

  • @W5AKC
    @W5AKC Год назад

    Nice tutorials!!! Many thanks!! I do have a question though...how would you do this with C# event Action instead of UnityEvent? I do not like setting events in the editor. I did code only for other events, but the UI update is confusing on where this could be done. Thanks!

    • @KetraGames
      @KetraGames  Год назад

      Thanks 😊
      You could add the HealthController as a SerializeField on the UI script. Then you could subscribe to the event in the Start method. Hope that helps 😊

  • @azropearce7566
    @azropearce7566 7 месяцев назад

    u sooooo amazing!!!! it is totally true! I love u so much. THX! H&K

  • @jasonwilliams8730
    @jasonwilliams8730 Год назад +2

    👍