Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 /
avatar image
0
Question by aaversa · Jun 02, 2018 at 12:23 AM · uitextmeshperformance optimization

TextMeshPro Performance Issues (Unity 5.6)

We're working on porting our game Tangledeep to Nintendo Switch, and part of that process is optimizing all aspects of the game to run at a smooth 60fps even on (relatively) low-end hardware. Unfortunately we're dealing with some noticeable, random hitches that appear to be the result of TextMeshPro methods.

Here's an example:

https://cdn.discordapp.com/attachments/157199747474522112/452260410603733003/unknown.png

And another one:

https://cdn.discordapp.com/attachments/157199747474522112/452259298404335623/unknown.png

These do NOT happen consistently or reliably. They are correlated to certain game actions but we haven't been able to reliably reproduce them, which makes it very frustrating to debug and optimize.

Our main canvas for the Player HUD uses Screen Space - Overlay, non-pixel perfect. There are a handful of TMPro elements for things like player health, XP, stamina, etc. Most frames, changing these numbers does not cause any noticeable spike at all.

We also use TMPro (NOT UGUI) for our flying 'damage number' popups, which are not on the canvas, but usually cause a big loss of performance from the SendWillRenderCanvases. Even so, sometimes this cost will be 5-10x higher than average on some frames because... why? We have no idea.

Any insight appreciated!

Comment
Add comment · Show 5
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 NoDumbQuestion · Jun 02, 2018 at 06:23 AM 0
Share

T$$anonymous$$Pro use shader to render text. The problem might be Text shadow or unlikely T$$anonymous$$Pro default shader does not support Nintendo Switch render target.

And flying text was problem maybe because in material shader settings have some Light emitting like outline text that cause to render shadow unnecessary.

avatar image aaversa · Jun 02, 2018 at 04:03 PM 0
Share

This happens on PC as well, so it is not a Switch specific issue. In fact, the hitches are noticeable even on higher end PC hardware.

The material of the text is just "Distance Field", no other lighting, shadows, shaders, etc used.

avatar image NoDumbQuestion aaversa · Jun 02, 2018 at 04:09 PM 0
Share
  1. Something was calling T$$anonymous$$Pro.SetText constantly like in a loop that force a text rebuild.

  2. T$$anonymous$$Pro was using shader like i say. And it always expensive when instantiate new text with new material and not re-use premade text. $$anonymous$$aybe you didnt use pooling text?

avatar image aaversa NoDumbQuestion · Jun 02, 2018 at 04:37 PM 0
Share

We're not instantiating new text, it's all pooled from the start of the game. Also there is nothing calling SetText in a loop.

Show more comments

0 Replies

· Add your reply
  • Sort: 

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

142 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

Related Questions

Using TextMeshPro in mobile games to improve performance. 0 Answers

How to update TMP Pro Sprite Shader using script/C#? 1 Answer

How hard is to replace UI Text with Text Mesh Pro? 2 Answers

Remove specific screen resolutions 0 Answers

URP Postprocessing & TextMesh Pro 1 Answer


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