-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some TMPro tags are not stripped, resulting in exceptions #24
Comments
For a full list of tags, see http://digitalnativestudios.com/textmeshpro/docs/rich-text/ |
https://gist.github.com/jushii/afd171d1234c0541af3cb97e6e7b2a64 This should fix most of the exceptions and make the tags work. I also added a few missing ones that are not in the TMPro documentation (e.g. gradient) |
Awesome, thanks for the list! |
Currently, I get an exception when trying to type out this string: So to fix this, I have to edit the class TextTagParser and change the UnityTagTypes field to the one written by @jushii? Why not include it in the release? |
These should absolutely be included. There's no reason I haven't - just haven't had time to update this repository much (though it's on the top of my list for my side projects). You are correct - changing out this line to use @jushii's gist should work:
In theory I'd also like to add these tags into the tests for tag parsing: |
Should be fixed in release 2.3 https://github.com/redbluegames/unity-text-typer/releases/tag/v2.3 Thanks for the help, @jushii and @nguyentrong101094! |
We need to strip all native tags when parsing the text, or else it will calculate the wrong number of characters to print and results in an ArgumentException.
Repro:
To fix, we either need to add all missing "Unity" tags to the parser, or calculate characters to print based on the visible text. For now the easiest fix is to include all missing tags. Ex:
style
link
Another issue that could come up is you can use color like "<#FFFFFF>" instead of <color=#FFFF>. If that results in this same issue, we may want to look at solution that examines the visible text.
The text was updated successfully, but these errors were encountered: