4:05 you can add sprites in if you add them to the base sprite sheet. Then in the sprite asset inspector, hit Update Sprite Asset near the top to have other marked sprites in the sheet get added in like the originals.
Thank you ❤️ I love typography and I feel like there aren't enough tutorials on that in our game dev corner of the internet :) I am super glad people find value in my tutorials!
Multiple sprites' pivot can be changed using the 'Slice' drop-down menu on the top-left 🥳 You can set the 'Pivot' of all sliced assets in the drop-down menu 🔥
Glad you enjoyed it =D! The window is Windows 11's clipboard. It's super handy! You should have a message pop up if you hit Win+v about enabling it if you haven't already. If you google "Clipboard Windows", you'll quickly find the official page on how to enable it and how to work with it :) I really wouldn't want to miss it anymore.
4:02- 4:06 not sure what you meant, but I was able to add a new sprite to my "sprite asset", I first created an image in gimp : 10'240 x 1024, (each sprite is 1024x1024) and I only drew 5 sprites (out of 10 spaces I had), I needed to add a new sprite, so I just drew 1 more in gimp, saved/replaced the 1st png file in unity, then in the "sprite editor" I added the new image, and then in the "sprite asset" I pressed the "Update Sprite Asset" (3:19 top right you can see it) button which is all the way at the top and it added my 6th sprite, maybe I missunderstood what you meant if not then you can add new sprites to the sprite asset this way. Very good tutorial though !
Thank you so much for the feedback =D! Yes, you are correct - adding one in the file works. I was more refering to the + and - buttons, which (at least the last time I checked) deleted or douplicated a sprite instead of the "+" giving the option of adding a new sprite from the project's art folder, for example. But good workflow =)!
Good catch. I tried adding more sprite sheets each of them has its own "sprite asset" and assigned them under "Fallback Sprite Assets" in the default "sprite asset" that I assigned in the Project Setting >> TextMesh Pro >> Settings >> Default Sprite Asset .... I don't know if there's a downfall to it but all of them works fine and I can add more sprite sheets without replacing each time
Can you combine this with your TMP Material preset video and make one on using a custom shader in sprites to have an outline on text and outline on sprites in the text?
Glad you enjoy it! I have a big playlist on TMP features, maybe there are more things in it that are new to you ;)? I have a few on clicking, hovering or calling events based on the link tag, for example :D
Hi Christina, thanks for the nice tutorials. Is it possible to detect when the mouse is hovering over a TMP sprite? I would like to display a tooltip in such situations. And to trigger the tooltip I need to know when the mouse is hovering over a sprite. I figured I'd ask the TMP expert! Thank you again.
Sorry it took a while to answer, stressful weekend 😉 In fact: Yes you can! You'll need the TMP_TextUtilities.FindNearestLink() function and the tag. The "how" is a bit more in depth, but if you can wait a few days, the tutorial on using the link tag for just this use case is scheduled for the 6th of December 😊👍
Thank you for a lesson, but I have one question, how can I unselect maskable property in TMP icons ? Note: I can see this property only in Debug Inspector, but I can't change it, everytime this revert my changes...
Hello Christina. Thank you for your tutorial. I have a question though. I am attempting to dynamically change the text attribute of the TextMeshPro object to alter the sprite asset. My problem is that once I change the text attribute, the TextMeshPro object displays the text literally and no longer renders the sprite asset. Do you have any idea if what I am trying to do is even possible?
Hi there =) Did I understand this correctly: You have a text like "" in your textbox. You want to change that to "" at runtime, and the words change but the new sprite is not being shown and instead you read the actual "" in your textbox instead? If so: Have a look if you named your sprites correctly, if you saved them correctly into the TMP Resources folder and if they are part of the same Sprite Asset. If they are in different assets, you'll need to tell the tag about that. Have a look at this tutorial if you are working with multiple Sprite Assets, I'm going more into depth about it there: ua-cam.com/video/JdGgrMWIknE/v-deo.html I hope any of this helped =)? Please let me know!
@@ChristinaCreatesGames That's correct. I change my sprite name from "healthbar_0" to "healthbar_1". I'm quite sure that I am getting the sprite names correct: when I type that exact name into the text box during runtime it works correctly. It just seems like the TextMeshPro object needs a refresh to parse the text and it doesn't do so automatically. Maybe the object has a redraw or refresh function that I have to call after I change the text.
@@ChristinaCreatesGames I've just spent some more time looking into this. It appears that directly manipulating the .text property of the TextMeshProUGIU game object doesn't work. You have to manipulate the TMP_InputField.text attribute. I've yet to figure out how to reference that, but that seems to be the answer. Currently my script is attached to the player game object and I'm trying to change the text inside a OnCollision2D event handler. I believe the InputField.text is a protected member of the TextMeshProUGUI class, so perhaps I have to move the OnCollision2D() function to the actual TextMeshProUGUI object.
@@ChristinaCreatesGames I've solved it. When I use tags like instead of their names it just works. I noticed that < sprite = 0 > (not the spaces) does not work. My guess is that the parser TMP uses is a little wonky. Thanks for listening.
this was amzaingling good. i tryed watchign 2 other videos about this but they were over 15 min long and the dialog was awflue. Great job on this vidoe (probably will watch you one about stiles cus that looked cool)
thx for the quick answer, I sth else as a workaround. It seems you can not apply effecta beyond tint to tmp sprite assets. But you can make a tmp font assets from your spritesheet, and assign it as a fallback font to the original font your using. Then you can reference the icon sprites from the fallback font with unicode characters, and use alls tmp effects with them. The downside is, you cant use color in the sprites themself. In my case, that was the best fit. I use icons with pop up damage numbers, to indicate different damage sources.
Hi Sergio :) TMP is a bit finnecky with how the tags need to be written. Give this one a try: . You need to remove the empty spaces around the equal sign and it should work. Please let me know if it did!
@@sergiovieira4869 Hm, that's a bummer. Alright, deep dive time. Go to Edit->Project settings->TextMesh Pro -> Settings and scroll down to your default sprite asset. Does it show that it is missing? If it is, set it up once more. Did you save your Sprite asset into the correct TMP Folder? That's Assets->Text Mesh Pro->Resources->Sprite assets. It won't find it if you saved it somewhere else. Have you tried writing (without any empty spaces)? Did it change anything? What happens if you don't try to get it via ID but via name? You can also try writing it like this: to force Unity to look for it; the asset still needs to be in the correct folder (though if you're trying to get the smilies to show up, I guess they already are). Lastly, you can set the asset you want to use as the one the textbox should be using (I only recommend using this strategy while searching for a bug, though!). Go to your TMP Component and click on "Extra settings". There's a space where you can drag your sprite asset into. Try again with the different methods of using ID, name, etc. Does the problem persist?
Is there way to increase the scale of all sprites on the Sprite Asset? I'd rather not have to increase each individual sprite on the atlas by the same amount
Sorry, this slipped me somehow. Yeah, you can scale all the sprites in an atlas at once! If you go to the overview where each sprite is being shown and you can set its size, rotation and place, keep scrolling down. There are values that change the values for all sprites in the asset equally :)
Download the sprites from my Google drive here: bit.ly/Flower_Sprites
4:05 you can add sprites in if you add them to the base sprite sheet.
Then in the sprite asset inspector, hit Update Sprite Asset near the top to have other marked sprites in the sheet get added in like the originals.
Clearest and most in depth explanation on the topic I've seen so far. You got yourself a subscriber.
Awesome, thank you! Glad you found it helpful =)
IDK why other videos were over 30 mins for this, I glad you covered this in 5 mins
It was harder than I thought, which is why I'm here :D
Awesome, glad I could help =D!
This was amazing. You are so knowledgeable about TMP and it shows.
Thank you ❤️ I love typography and I feel like there aren't enough tutorials on that in our game dev corner of the internet :) I am super glad people find value in my tutorials!
Again, I'm saving this one for later! Thanks Christina, great job!
Yay! Thank you!
And again I learnt something new! Amazing content. Thank you Christina!
Glad it was helpful! This video was fun to make :D Put a new topic on my upcoming list, too!
Multiple sprites' pivot can be changed using the 'Slice' drop-down menu on the top-left 🥳
You can set the 'Pivot' of all sliced assets in the drop-down menu 🔥
That's very good to know, thank you for commenting 👍💛
Life saving. TYVM
Great job making it simple and quick!
Thank you :D!
Very exciting tutorial! Thank you for making it :)
I want to ask what's that window that pops up at 5:02 ?
Glad you enjoyed it =D!
The window is Windows 11's clipboard. It's super handy! You should have a message pop up if you hit Win+v about enabling it if you haven't already. If you google "Clipboard Windows", you'll quickly find the official page on how to enable it and how to work with it :) I really wouldn't want to miss it anymore.
@@ChristinaCreatesGames Awesome! Thank you so much! :)
Thanks Christina. I'm using this in my latest project.
That's cool :D!
Nice and compact tutorial. Thank you :)
Thank you very much =) Glad you liked it!
Another great tutorial :) This might come in handy someday!
Glad you think so! I hope you'll remember this video then :D!
Really nice , this tutorial was very helpful
Glad it was helpful!
Thank You! This video saved my time!!! (and also saved me!)
Glad to hear you found it useful =D!
Sweet, thanks!
4:02- 4:06 not sure what you meant, but I was able to add a new sprite to my "sprite asset", I first created an image in gimp : 10'240 x 1024, (each sprite is 1024x1024) and I only drew 5 sprites (out of 10 spaces I had), I needed to add a new sprite, so I just drew 1 more in gimp, saved/replaced the 1st png file in unity, then in the "sprite editor" I added the new image, and then in the "sprite asset" I pressed the "Update Sprite Asset" (3:19 top right you can see it) button which is all the way at the top and it added my 6th sprite, maybe I missunderstood what you meant if not then you can add new sprites to the sprite asset this way. Very good tutorial though !
Thank you so much for the feedback =D! Yes, you are correct - adding one in the file works. I was more refering to the + and - buttons, which (at least the last time I checked) deleted or douplicated a sprite instead of the "+" giving the option of adding a new sprite from the project's art folder, for example. But good workflow =)!
Good catch. I tried adding more sprite sheets each of them has its own "sprite asset" and assigned them under "Fallback Sprite Assets" in the default "sprite asset" that I assigned in the Project Setting >> TextMesh Pro >> Settings >> Default Sprite Asset .... I don't know if there's a downfall to it but all of them works fine and I can add more sprite sheets without replacing each time
Thanks a lot for the video! This was super helpful
Glad to hear it =D!
Awesome and very useful video!
Glad it wa helpful =D!
thanks for the video!! that was really awesome it's really saved a lot of time :)
Glad to hear that, thank you!
Very handy. Thank you.
Glad it was helpful!
This is so good
Thank you =D!
Great tutorial of textmesh pro
Thank you :D
works good. thanks!
Thank you :D!
Thanks for the video.😀
Instant subscribe, great video!
Awesome, thank you 💛
Can you combine this with your TMP Material preset video and make one on using a custom shader in sprites to have an outline on text and outline on sprites in the text?
I'am using TMP since years.. but I don't know! Ist is great. Thank you very much.
Glad you enjoy it! I have a big playlist on TMP features, maybe there are more things in it that are new to you ;)? I have a few on clicking, hovering or calling events based on the link tag, for example :D
Hi Christina, thanks for the nice tutorials. Is it possible to detect when the mouse is hovering over a TMP sprite? I would like to display a tooltip in such situations. And to trigger the tooltip I need to know when the mouse is hovering over a sprite. I figured I'd ask the TMP expert! Thank you again.
Sorry it took a while to answer, stressful weekend 😉
In fact: Yes you can! You'll need the TMP_TextUtilities.FindNearestLink() function and the tag.
The "how" is a bit more in depth, but if you can wait a few days, the tutorial on using the link tag for just this use case is scheduled for the 6th of December 😊👍
Thank you for the nice vid! :)
Glad you liked it!
Thanks for the video.
Glad you enjoyed it =)!
Thank you for a lesson, but I have one question, how can I unselect maskable property in TMP icons ?
Note: I can see this property only in Debug Inspector, but I can't change it, everytime this revert my changes...
Hello Christina. Thank you for your tutorial.
I have a question though. I am attempting to dynamically change the text attribute of the TextMeshPro object to alter the sprite asset. My problem is that once I change the text attribute, the TextMeshPro object displays the text literally and no longer renders the sprite asset.
Do you have any idea if what I am trying to do is even possible?
Hi there =)
Did I understand this correctly:
You have a text like "" in your textbox. You want to change that to "" at runtime, and the words change but the new sprite is not being shown and instead you read the actual "" in your textbox instead?
If so: Have a look if you named your sprites correctly, if you saved them correctly into the TMP Resources folder and if they are part of the same Sprite Asset. If they are in different assets, you'll need to tell the tag about that. Have a look at this tutorial if you are working with multiple Sprite Assets, I'm going more into depth about it there: ua-cam.com/video/JdGgrMWIknE/v-deo.html
I hope any of this helped =)? Please let me know!
@@ChristinaCreatesGames That's correct. I change my sprite name from "healthbar_0" to "healthbar_1". I'm quite sure that I am getting the sprite names correct: when I type that exact name into the text box during runtime it works correctly. It just seems like the TextMeshPro object needs a refresh to parse the text and it doesn't do so automatically.
Maybe the object has a redraw or refresh function that I have to call after I change the text.
@@ChristinaCreatesGames I've just spent some more time looking into this. It appears that directly manipulating the .text property of the TextMeshProUGIU game object doesn't work. You have to manipulate the TMP_InputField.text attribute.
I've yet to figure out how to reference that, but that seems to be the answer.
Currently my script is attached to the player game object and I'm trying to change the text inside a OnCollision2D event handler. I believe the InputField.text is a protected member of the TextMeshProUGUI class, so perhaps I have to move the OnCollision2D() function to the actual TextMeshProUGUI object.
@@ChristinaCreatesGames I've solved it. When I use tags like instead of their names it just works.
I noticed that < sprite = 0 > (not the spaces) does not work. My guess is that the parser TMP uses is a little wonky. Thanks for listening.
can i also make it so if i press alt for example that the icon gets disabled and the name of the icon stands as text there?
this was amzaingling good. i tryed watchign 2 other videos about this but they were over 15 min long and the dialog was awflue. Great job on this vidoe (probably will watch you one about stiles cus that looked cool)
Cool, thank you so much :D! Hope you'll enjoy the stile one as well =)!
Is there a way to add a dropshadow or outline to the icons?
I never tried, but I'd recommend adding the effects you want to have to the sprites themselves. That would be the easiest option 🤔
thx for the quick answer, I sth else as a workaround.
It seems you can not apply effecta beyond tint to tmp sprite assets. But you can make a tmp font assets from your spritesheet, and assign it as a fallback font to the original font your using. Then you can reference the icon sprites from the fallback font with unicode characters, and use alls tmp effects with them. The downside is, you cant use color in the sprites themself.
In my case, that was the best fit. I use icons with pop up damage numbers, to indicate different damage sources.
Works well!! DANKEEE
Awesome, glad to hear it :D!
Help me please! I can't even display Unity default sprite (emoji), I'm using index ""(i've also tried ), but it shows the text, not the image.
Hi Sergio :) TMP is a bit finnecky with how the tags need to be written. Give this one a try: . You need to remove the empty spaces around the equal sign and it should work. Please let me know if it did!
@@ChristinaCreatesGames It didnt work unfortunaly.
@@sergiovieira4869 Hm, that's a bummer. Alright, deep dive time.
Go to Edit->Project settings->TextMesh Pro -> Settings and scroll down to your default sprite asset. Does it show that it is missing? If it is, set it up once more.
Did you save your Sprite asset into the correct TMP Folder? That's Assets->Text Mesh Pro->Resources->Sprite assets. It won't find it if you saved it somewhere else.
Have you tried writing (without any empty spaces)? Did it change anything? What happens if you don't try to get it via ID but via name? You can also try writing it like this: to force Unity to look for it; the asset still needs to be in the correct folder (though if you're trying to get the smilies to show up, I guess they already are). Lastly, you can set the asset you want to use as the one the textbox should be using (I only recommend using this strategy while searching for a bug, though!). Go to your TMP Component and click on "Extra settings". There's a space where you can drag your sprite asset into. Try again with the different methods of using ID, name, etc. Does the problem persist?
@@ChristinaCreatesGames I've found out the error. Tysm for your help! Great Video!
@@sergiovieira4869 Glad to hear you were able to fix it 👍
Is there way to increase the scale of all sprites on the Sprite Asset? I'd rather not have to increase each individual sprite on the atlas by the same amount
Sorry, this slipped me somehow. Yeah, you can scale all the sprites in an atlas at once! If you go to the overview where each sprite is being shown and you can set its size, rotation and place, keep scrolling down. There are values that change the values for all sprites in the asset equally :)
@@ChristinaCreatesGames Thank you! I assume you mean the "Global" settings. Completely missed those. Thanks!
@@NorthFolkStudios Ah, yeah! I had Unity closed already when I typed that out =D Glad you found it anyway!