Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
12 Jun 22 - 14 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
avatar image
0
Question by migrus2013 · Sep 14, 2019 at 08:37 PM · unity 5texterror messagetextmeshpackages

TextMeshPro 2.0.1 error

Hello, my fellow game devs!
I'm quite new in using TextMeshPro and so after a long and tedious fight with this package and his two mighty problems, I finally ask you for your's generous help.
First trouble is this big error message that now I'm seeing every time opening my project and also in my nightmares. After a long, painful and worthless solution-seeking I just give up on it, leaving as it is, because only trouble it makes - just bothering me, sitting in the console as an ugly weed in a beautiful garden of my debug's logs. But this hideous monstrosity may be the cause of the second and worse problem, so I put his text here:

 ArgumentException: An item with the same key has already been added. Key: 0
 System.Collections.Generic.Dictionary`2[TKey,TValue].TryInsert (TKey key, TValue value, System.Collections.Generic.InsertionBehavior behavior) (at <a8ed250850854b439cedc18931a314fe>:0)
 System.Collections.Generic.Dictionary`2[TKey,TValue].Add (TKey key, TValue value) (at <a8ed250850854b439cedc18931a314fe>:0)
 TMPro.TMP_FontAsset.InitializeDictionaryLookupTables () (at Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_FontAsset.cs:589)
 TMPro.TMP_FontAsset.ReadFontAssetDefinition () (at Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_FontAsset.cs:607)
 TMPro.TMP_FontAsset.get_characterLookupTable () (at Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_FontAsset.cs:139)
 TMPro.TextMeshProUGUI.LoadFontAsset () (at Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMPro_UGUI_Private.cs:539)
 TMPro.TextMeshProUGUI.OnValidate () (at Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMPro_UGUI_Private.cs:302)

And now, the second problem. This beast is stealing my time every time I open my future masterpiece to breath some life inside of it. Every time I start to work on my dream project one or more of many TextMeshProUGUI just stops displaying text carefully placed in it! The text is still inside the text window, but the inside scene and game view - nothing, like it were stolen by a ghost or some other supernatural thing. I thought the problem was inside SDF Material attached to the object, but, what a surprise, it also disappears like a bad father, when it goes to buy some cigarets and then never returns. The only solution I found for that - create a new TextMeshPro text object, but, as you might already guess, this is not permanent.

Thanks for your time and mind power to help me defeat this annoying duo. Also, I will provide additional information, but I do not know what type of information is needed and where to seek.
Have a nice day!

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

3 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by blastbeatsandcode · Dec 18, 2019 at 12:54 AM

I am not certain if this is helpful, and I am fairly inexperienced with TMPro myself, but when I ran into this issue I solved it by using a different Font Asset on the Text Mesh Pro UGUI component. The REAL solution would be to fix the one you're using if it's the one you want to use in the end.

In my case, the font I was using was not generated in the Font Asset Creator properly.

Window > TextMeshPro > Font Asset Creator

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image SkyGolem · Feb 12, 2020 at 08:54 AM 0
Share

I'm having the same issue, could you explain, what you mean by "the font I was using was not generated in the Font Asset Creator properly", I don't see, how you could make mistakes there.

avatar image blastbeatsandcode SkyGolem · Apr 08, 2020 at 01:58 AM 0
Share

Like I said, I'm not super familiar with how the fonts work with T$$anonymous$$Pro. I just know that some of the fonts I have tried to use with it work after I use the creator, and some don't. I have never created my own font and usually buy them or find them for free online when I use them.

avatar image
0

Answer by arturgiardi · Feb 12, 2020 at 11:35 PM

I had the same problem today and did a few things:

  • I deleted all fonts assets that I created using Text Mesh Pro

  • Deleted all the .meta files related to the fonts assets and the font files used to create these fonts assets

  • I created the fonts again with Packing Mode equal to Optimum

I don't know exactly what caused this error to disappear, but this process worked for me. I hope it helps you too.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by htq110219891 · Jun 09, 2020 at 08:54 PM

This post has a solution https://forum.unity.com/threads/help-getting-an-argumentexception-thrown-by-textmeshpro-ui-control.735821/

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

287 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

2018.2 text mesh pro. plugin Errors. 7 Answers

How do I make a TextMesh Pro Font Asset from a texture atlas? 0 Answers

Change TextMeshPro text frequently after time 0 Answers

unity 3D URP Error 0 Answers

TextMeshPro Set Alpha Color 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges