How to use a Custom Font with Text Mesh Pro in Unity (Custom Texture, Add effects in Photoshop)

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

КОМЕНТАРІ • 119

  • @Khud0
    @Khud0 5 років тому +7

    I used to hate Unity so much for the way it handles text, but your tutorial completely flipped my perspective. Thank you so much! :)

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

    When I google something on how to do and your video pops up, that makes me really happy because I know I am getting a solid answer!

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

      Thanks! I'm glad the videos have been helpful!

  • @yarilochka_vaishnavi
    @yarilochka_vaishnavi 4 роки тому +11

    Thanks a lot! i was disappointed that i can't use a custom font with TextMeshPro.. but here you are!

  • @tudorc.stamate5523
    @tudorc.stamate5523 2 роки тому +2

    I was running in circles trying to figure out why my custom atlas font wasn't displaying... Apparently, adding the atlas texture to the Texture field in the Face panel made it invisible. Setting that to None and assigning the atlas to the Debug panel's texture slot as you showed, worked. Thanks a bunch!

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

    Thanks sir, 3 years later still helping people

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

      Yup it's awesome how these videos live forever and most of them are still valid years after release!

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

    I always come back to this video over the years, thanks!

  • @willwroble9904
    @willwroble9904 5 років тому +3

    this tutorial saved my life! I couldn't find out how to export the atlas anywhere. I was about to make my own atlas by screenshotting text edit; good thing I found this video.

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  5 років тому

      Glad you found it helpful!

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

      @@CodeMonkeyUnity I managed to save the atls as png but even without chaning anything in it i just use that png, it makes all the latter just white squares.

  • @JasperDev
    @JasperDev 4 роки тому +6

    THANK U!!! THANK U!!! THANK U!!! THANK U SO MUCH!!!!!

  • @noobsaibot3922
    @noobsaibot3922 5 років тому +1

    This channel deserves more subscribers

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

    Brilliant video and explanation! Thank you for knowledge!

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

    This is really cool! I wasn't aware of this.

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

    Great video, very informative and good length!

  • @rickloyd8208
    @rickloyd8208 5 років тому +3

    wow, new background music :) I want to switch to my own custom font, so as always you create right tutorial :D

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

    Thank you this is exactly what i was looking for, i could not figure out how to have a font asset!

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

    Man, you always save my life. Thanks for so much knowledge

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

    Thank you for a video this important and this overlooked by game devs. Cheers!

  • @hakunamattatah4723
    @hakunamattatah4723 5 років тому

    Tnx CodeMonkey Guy. Keep up the good work!

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

    Thank you so much! Very useful!

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

    Do you have an updated TextPro vid. I'm looking to set the text in code, but I want to use the richtext tags (mainly for a tool tip) of sorts Thanks

  • @Dhanen
    @Dhanen 3 роки тому +5

    Thanks, that's very useful! But, if I am using a font with special characters from other languages as it's mine (spanish) with accent marks for example, it seems the converter doesn't works very well and the special characters are not converted properly. Any idea of how to solve this? It will be much appreciated!
    EDIT: Just a few minutes after publishing this message I saw I am dumbass and I can select the codification (ASCII, Extended ASCII...) so that solves the problem if anyone else had it. Greetings and thanks again!

  • @IAmSuperWeirdGal
    @IAmSuperWeirdGal 5 років тому +5

    Yes! Thank you so much! I was wondering why TMP was not generating an atlas, I figured out after watching this video. =)
    I was worried when the all font in my text based game up and disappeared, some who the defaults were changed. xD

    • @wlwl2
      @wlwl2 5 років тому

      Same!

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

    I know this is kind of an old video, but do you know how to convert a sprite sheet into a font? I wanted to go for more of an arcade look, with unique shading, and can't seem to get it into my game, and other font making sites don't support the shading I used. Like FontStruct only uses black and a transparent background

  • @exarpo7550
    @exarpo7550 5 років тому +2

    Thank you, very useful, love your chanell!

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

    This was so helpful thank you so much

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

    Is there a way to do it with a custom font that you made and not an already generated font from a website.

  • @RedeathkA
    @RedeathkA 5 років тому +1

    Jessy, yeah! Ultra-useful short lesson, thanx!

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

    Many thanks! Just what I need ;)

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

    +1
    This helped me, thanks.

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

    Thank u once again brotha!

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

    is it possible to use 1 font to put slightly adjusted versions of it onto multiple objects, or do I need an entirely new font?

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

    very extremely Thank you

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

    THANK U that was very helpful

  • @thanos_n9s145
    @thanos_n9s145 5 років тому +1

    Can you cover a topic by creating video "Making camera don't cross through objects"?

  • @RoronoaZoro-lz7rp
    @RoronoaZoro-lz7rp 4 роки тому

    Ty as always.

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

    Very useful thanks!

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

    OMG!!!! THANKS!!!!!!!!

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

    Thanks so much! it was exactly what I needed

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

    Thanks this really helped

  • @MaazKhan-vf2zu
    @MaazKhan-vf2zu 5 років тому

    Thank You so Much I was Just About to Search for it.

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

    What if the font I want to use comes as a png file? The font isn't a font file like a ttf or otf, was wondering if TextMeshPro has something that'll make it easier to use fonts that come in png files

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

    Thank you so much!

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

    thanks brow !!

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

    Just came from the Visual Scripting Udemy Course, Im on 23rd lesson, UI.

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

      I hope you're enjoying it!

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

      @@CodeMonkeyUnity I am!
      Great Course, just finished my first funcional level

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

    Thanks a lot! you know how to make the text appear above the sprites??

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

      You can play around with the Sorting Layer and Sorting Order

  • @SMT-ks8yp
    @SMT-ks8yp 2 роки тому

    Okay, now it complains that asset's atlas texture is unreadable and displays the old (TMPro's own) font.

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

    how do I import the font? and what type of file does it have to be?

  • @AmanSharma-fu5um
    @AmanSharma-fu5um 4 роки тому

    I have created a TMP font asset. But when I assign my TMP font asset to any TMP Text object. The edges of my fonts are getting distorted. I have changed the shader to all the other option but the problem still retains. And my fonts are working very fine with photoshop and Illustrator. So the problem is not with the fonts... Please help me how can I fix this issue... Thanks in Advance...

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

    This vid makes me go YES

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

    thank you thanks a lot man

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

    Thanks, great video. Is there a way to change the basic font of the Textmesh pro component? I made my whole game and now I want to localize it, but the font does not even have extended ascii characters. I would love to just change the font for all the components at once and set it as a new default without needing to go through all prefabs and screens manualy. Is that possible?

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

      Hmm maybe you could replace the file in the TextMeshPro folder and replace it with another font using the exact same file name. If you do that and dont touch the .meta file it might update all the references

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

      @@CodeMonkeyUnity I did it. If you dont change the font from default font in the component, then changing the default font in Textmesh Pro settings file changes the font for all components.
      Your way also works, though. I did that when I found yet another wierd character I needed and was not in my new font, replacing the font asset with a new asset named exactly the same (replacing it) does change the font for all components using that font.

  • @허승재-y3k
    @허승재-y3k 3 роки тому

    폰트 적용시켜서 쓰는데
    The character used for Underline is not available in font asset [SO].
    UnityEngine.Debug:LogWarning (object,UnityEngine.Object)
    MissingReferenceException: The object of type 'Material' has been destroyed but you are still trying to access it.
    Your script should either check if it is null or you should not destroy the object.
    "WHY"

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

      The first error, seems like you're using a font that doesn't have an underscore, fonts dont all have every single character
      The second one, sounds like you destroyed a Material but then you're trying to access it.

  • @SociopathDev
    @SociopathDev 5 років тому

    thanks, life savior

  • @rickloyd8208
    @rickloyd8208 5 років тому

    BTW you also mentioned that bitmap font looks nice only on the exact size but if you try up/down scale, it will look pixelated and not crispy... so then why you switched from good quality font to bitmap in the example?

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  5 років тому +1

      If you're working with normal custom fonts without any special effects you should use Distance Field. However the way that works is by making the font have a alpha gradient which means it cannot be easily modified for adding effects.
      So for adding special image effects you need a bitmap font which means you need to know the correct size that you'll use it for since it does have those limitation.
      For example one of the videos coming soon is making a Hit Counter like I used in Hyper Knights which uses a bitmap font with nice effects to show the number of hits.

    • @rickloyd8208
      @rickloyd8208 5 років тому

      ​@@CodeMonkeyUnity Thanks for your reply.So the problem I faced before was that I needed really big numbers (font size 450-600). You cannot fit 10 digits even within 2048 atlas. So what should you do in this case? If you keep font smaller, for example 300 (the max size for default Text component) and scale it 1.5x up, it will not look sharp.
      p.s. I will wait for your next video as well, what I love about your channel is that you share useful tips/techniques you may need "tomorrow" in your own code.

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  5 років тому

      Why do you need such big numbers? A font of that size would almost occupy the entire screen.
      If you're trying to really fit a text to occupy an entire 4K window then making a specific texture with the text that you need would probably be the best bet, that is a very extreme use case.

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

    I have a few sprite sheets with fonts on them in .PNG form. Will this work with my sprite sheet?

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

      It should work but follow the process in the video where you generate the spritesheet then copy paste on top of the letters you have. It's much simpler than if you try to use the image you already have and manually assign the position for each letter.

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

      @@CodeMonkeyUnity OK Thanks

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

    thanks!

  • @theomarcuzzi9339
    @theomarcuzzi9339 5 років тому

    thank you very very very much

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

    thanx a lot

  • @SMT-ks8yp
    @SMT-ks8yp 2 роки тому

    Is it possible that somehow not all charcters will fit into the sheet? If so, what can I do to fix it?

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

      You can increase the texture size or decrease the size of each character

    • @SMT-ks8yp
      @SMT-ks8yp 2 роки тому

      @@CodeMonkeyUnity thanks, found it already.

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

    THank you so much

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

    Thank you!

  • @ghua
    @ghua 5 років тому

    hello, how do i get the texture ? It only generates .asset file with texture in it and I cannot edit it :/ I am on Mac

  • @MaazKhan-vf2zu
    @MaazKhan-vf2zu 5 років тому

    Can you make Tutorial on Creating Main menu, Option and pause Menu? Help pls

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

    This doesn't seem to work at all in Unity 2019.3.12 . Almost everything looks different.

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

      I just did it on 2019.3.11 and it worked perfect! I just had to change padding inside the materials , seems like it doesn't recognize it from the atlas

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

      @@94Kansas Hello, did you create a custom atlas with PS?

    • @94Kansas
      @94Kansas 4 роки тому

      @@twnhny1994 yes! Exported the atlas to png file, then opened into PS, edit a bit and then turn it back to unity, assigned to a material bitmap custom atlas, adjusted the padding and it worked so good!

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

      @@94Kansas ok then I'll try edit the atlas with PS because I tried with GIMP but didn't achieve anything

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

    how i change font weight?

  • @Mr.IN3V1T4BL3
    @Mr.IN3V1T4BL3 3 роки тому +1

    Can u make a multi-player game in unity .

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

    Thank you! Couldn't figure out how to set the font. I'm wondering, though, if using a shader wouldn't be better than editing it externally to achieve the effect you did? I guess it depends what you are trying to do, so it's good to know that way exists.
    EDIT: Except... I think the atlas is messed up. It's all gibberish and fragmented when I use it in TMP.
    NM: I tried again and got it to work.

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

      If you wanted a more custom effect (perhaps a moving gradient over time) then yup a shader would be the way to go, in my case I just wanted a simple baked effect.

  • @danielmoon5143
    @danielmoon5143 5 років тому

    Thanks!!!!!!!!!

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

    Thanks, 100th comment!!

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

    the video starts at 2:34. You're welcome

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

    i cant use namespace 'TMPro' in visual studio Code . anyone have suggestens ?

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

      You need to have the TextMeshPro package installed

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

      @@CodeMonkeyUnity i have it. Also i try uninstall and instal again but nothing.

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

      @@tornikenijaradze3017 Were you able to solve the problem?

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

    Did they removed textmesh pro ? Because I cant find it anywhere

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

    Thank you very much, i would have given up and use regular text if it wasnt for you

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

    thanks

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

    i cant edit the text help

  • @EricR971
    @EricR971 5 років тому

    TY

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

    Your voice reminds me of Kermit the Frog I love it

  • @alphastudios_yt
    @alphastudios_yt 5 років тому

    Can i show chinese text using these method

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  5 років тому +1

      Sure, as long as the font contains those character it will export the image.

  • @isl270
    @isl270 5 років тому

    Thaaaaaaanks

  • @chriswooohoo4518
    @chriswooohoo4518 5 років тому

    2:34

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

    Why is there a dude in your game named "SummAnus?"

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

      I just googled "random roman names" and used what came up

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

    i hate when you skip video fast! i need to know exactly what are you doing!

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

    im using this to get comic sans

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

    WARNING!
    TextMeshPro now allows the drag and drog
    I am using unity version 2020.3.1

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

    aaaaaaaaaaaaaa my eyes white photoshop
    Thanks for Help thou

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

    thanks!

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

    2:33