Floating Text in Unity

Поділитися
Вставка
  • Опубліковано 29 лис 2024

КОМЕНТАРІ • 53

  • @revmatch6r
    @revmatch6r 4 роки тому +21

    Never questioned why taking damage always had to be negative. "I love you" damage just changed the game for me tysm bmo

  • @deadbroadcastpc
    @deadbroadcastpc 4 роки тому +3

    He’s alive! Glad to see more videos dude!

  • @jimmyljr95
    @jimmyljr95 4 роки тому +4

    Solid video on your first day back, keep it up!

  • @ouckah
    @ouckah 2 роки тому +2

    Really helped me understand the TextMesh! For those who are watching this as well, you could also add an event at the end of the animation in the animation tab and use that instead of creating a "DestroyInSeconds" behavior, but other than that, everything else was very helpful!!

  • @Ainzworth269
    @Ainzworth269 4 роки тому

    glad to see that u still making video, and the quality just keep on improving, really enjoy ur content

  • @jo.cbr125
    @jo.cbr125 Рік тому

    Very nice Tutorial. I started out with Unity 2 days ago and I could follow everything. Thank you very much

  • @eileeng2492
    @eileeng2492 4 роки тому +2

    Hey glad your back.
    Great explanations.
    Helping me explore a different level.

  • @Robin-os1os
    @Robin-os1os 2 роки тому

    That intro was so goooood :)))

  • @davidnikolov1995
    @davidnikolov1995 2 роки тому

    Hey that really helped me. I am so happy that there are people like you out there who try to help.

  • @jakeduncan2721
    @jakeduncan2721 4 роки тому +1

    BMo you are a top tier youtuber - good stuff

    • @BMoDev
      @BMoDev  4 роки тому

      Thanks friend

  • @russellgu8y2447
    @russellgu8y2447 Рік тому

    Thanks man, I was really struggling with other tutorials

  • @hipunpun
    @hipunpun 2 роки тому +1

    Straight to the point. Very helpful, thank you! :)

  • @ryanaflalo8245
    @ryanaflalo8245 Рік тому

    Thanks this helped a ton!

  • @DelBoy573
    @DelBoy573 Рік тому +2

    Why is there no option to change the layer order for Text Mesh objects? It appers behind my background and I cant find a single option to change it!

  • @beastmasterbg
    @beastmasterbg 2 роки тому

    Thank you so much. It was easy to understand and it worked !

  • @beardordie5308
    @beardordie5308 4 роки тому +1

    Nice video. You mentioned object pooling, which would really be necessary in a real game where many of these are shown. Another approach is to use Unity's particle system to instantiate these texts, which would automatically pool them as well. That's a more complex setup, however. And for either of those approaches, it would be a good idea to separate out the UI and sound effects code from the health/damage code, which can be done using events that pass the health value to any interested subscribers. Again, a more complex setup, but by getting into that habit, you can be making systems that are independent of each other and yet plug into each other very easily.

    • @BMoDev
      @BMoDev  4 роки тому +1

      💯clean code keeps the demons away

  • @chrisheld8463
    @chrisheld8463 3 роки тому

    Perfect! Exactly what I needed.

  • @cook_easier
    @cook_easier Рік тому

    Thanks, You made my day!

  • @Unity-BR
    @Unity-BR 3 роки тому +1

    So simple and so hard to find... Very very tank you!

    • @BMoDev
      @BMoDev  3 роки тому

      Glad it helped!

  • @WillsArcade
    @WillsArcade 3 роки тому

    Super helpful and clear thanks!

  • @theSimulist
    @theSimulist 2 роки тому

    Sweet Dude

  • @marcuswang8500
    @marcuswang8500 Рік тому

    Nice tutorial! But I have one question is that how to change Text Mesh sorting layer in code to make it above everything else?

  • @abiskibitamcgrath6792
    @abiskibitamcgrath6792 4 роки тому +1

    Thanks a lot! good video!!

    • @BMoDev
      @BMoDev  4 роки тому

      Appreciate it 🙏

  • @tobysto
    @tobysto 4 роки тому +2

    Awesome! I’ll put this to the test!, also,,,, first view and comment! (:

  • @nugraha000
    @nugraha000 2 роки тому

    great tutor, i subcribe directly. keep it up👍👍

  • @sleepyminecart6182
    @sleepyminecart6182 Рік тому

    i was wondering can you make it so if you touch a object that its shows the text and if its possible how?

  • @lfnkf
    @lfnkf 3 роки тому

    Have followed this and worked really nice, but when I build, there is no text / animation showing. Any idea why?

  • @manychat_learn
    @manychat_learn 4 роки тому

    i love ur contents

  • @amjadmohsin7
    @amjadmohsin7 2 роки тому

    hi, can you please tell about raycast hit the object and show dialogue box? if u can make video of it.

  • @sadhakkumar6018
    @sadhakkumar6018 2 роки тому

    thank you

  • @infiniti7773
    @infiniti7773 2 роки тому +1

    Bit of a necro comment, but is it necessary to make a new script just to destroy the object? Can't you just put Destroy(prefab, 1f); in your ShowDamage function?

    • @BMoDev
      @BMoDev  2 роки тому

      You sure can.
      However, if youre spawning quite a few of these at a time you may want to object pool it and disable rather than destroy. Perhaps you need more control over effects that can be handled in the script.
      The performance saved from not using a script is negligible, but you certainly dont need to if you dont want to

    • @infiniti7773
      @infiniti7773 2 роки тому

      @@BMoDev ah that makes sense, thanks for the quick reply!

  • @whilma_dikfit
    @whilma_dikfit 2 роки тому

    Love the way you explain this you are amazing!!
    I had 1 problome and that was that my transform was a rect transform. I didn't know why and didn't notice, but I could just remove it and it changed to a normal transform.

    • @BMoDev
      @BMoDev  2 роки тому

      Thanks! You probably were using a UI text element as opposted to a GameObject with a TextMesh component

  • @ItsMeHelel
    @ItsMeHelel 3 роки тому

    Hey, what is your VSCode theme?

  • @peteypeetepete
    @peteypeetepete 3 роки тому

    my text doesnt show up as the animation

  • @vergilw7009
    @vergilw7009 3 роки тому +1

    hello, if I am using TextMeshPro, should the code should need to change ? the pop up text did not change to the actual damage no., and the console showing : "NullReferenceException: Object reference not set to an instance of an object"

    • @oatie751
      @oatie751 3 роки тому

      U need to at the top of ur code put using UnityEngine.TMPro;

  • @frankaors5223
    @frankaors5223 4 роки тому

    hey bmo can you do a video about draining life and showing a floating text that shows how much damage you dealt to an enemy using your old health bar video bar? like in terraria or 2d rpg games

  • @Zucth
    @Zucth 2 роки тому

    this doesn't work for me the text didnt show up.

  • @cripton2267
    @cripton2267 2 роки тому

    Its Cile :D

  • @cripton2267
    @cripton2267 2 роки тому +1

    Thank you :D My name is cole

  • @vladplaz
    @vladplaz 5 місяців тому

    not working for 2d

  • @stupidmonkey089
    @stupidmonkey089 3 роки тому +4

    When I try and follow this my text mesh just appears as an orange outline of the text. Changing the color doesn't actually change the text inside it and it doesn't show up in the scene. I have no idea what I'm doing wrong.
    Edit: Found out the Text Mesh use the Default sorting layer, so I had to either change it's sorting layer in code or make the default above everything else

  • @beastmasterbg
    @beastmasterbg 2 роки тому

    Thank you so much. It was easy to understand and it worked !