Filling your code or text boxes by hand with TextMeshPro style tags can make the actual string you want to be displayed hard to read. Let's create an automatic system that handles adding tags for us and have it work at runtime, too!
I love tags (I guess at this point in my series on them it's obvious), but writing them into strings as well as remembering to do so in the first place, can be rough. I've had text boxes where the contents were almost 50% tags and I had no clue anymore what the original text actually had been - it was super hard to read.
By working with this system though, we will make our life easier and let our tags be automatically set. This will remove our "oh, I need to remember to do"-list by quite a bit and make working with tags even easier!
💬 Discord 💛
You are very welcome to join!
/ discord
🛍️ Store links 🛍️
If you'd like to support my channel, consider using my affiliate link when buying cool stuff in the Unity asset store: https://assetstore.unity.com/?aid=110... [Affilate link]
Or on Humblebundle: https://www.humblebundle.com/?partner... [Affiliate link]
Or in the Synty Store: https://syntystore.com/98327 [Affiliate]
🎮 Play my games on Itch.io 🎮
https://christinacreatesgames.itch.io
📖 Chapters 🔖
00:00 The problem with adding style tags manually
00:36 Preview of the auto tagging system we want to create
01:09 The prerequisites - what do you need to know and have before doing this?
01:48 Create the scriptable object to hold our keywords to auto tag them later
02:22 The auto tagging system
03:52 Using the auto tag system in the script to set the text box's text
04:17 Tweaking 1: Upper and lower case spellings
04:41 Tweaking 2: Plurals of words
#unitytutorial
Watch video Let's automate writing Style Tags into your strings for TextMesh Pro! online, duration hours minute second in high quality that is uploaded to the channel Christina Creates Games 24 October 2022. Share the link to the video on social media so that your subscribers and friends will also watch this video. This video clip has been viewed 2,891 times and liked it 98 visitors.