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 BestCommie · Sep 28, 2015 at 07:57 PM · uitextfpscolorscrollview

FPS problem with Multi-Colored text on Unity 5 uGUI via Rich Text

Hello everyone.

So i have the following problem: i have a prefab which i instantiate and then fill it's GetComponent().text =

("<color=#FFC300FF>" + string1+ "</color> <color=#E11010FF>" +string2+ "</color> <color=#13A01AFF>" + string3+ "</color>");

After that i parent every prefab in a ScrollRect and create scrolling list. All of the above during Start(){}

The prefab is simple, it has two text components and two images which for now are filled with a color. Problem is that scrolling said list causes EXTREME FPS Loss.

Even using just one color it causes big drop in frames.

Is there any way around this. I need to show x different stats with x different colors in a single text Component(new UI not GUI). Is there a way to do that, so it doesn't kill fps that much (some cpu usage is expected but this much is killing a 3.2Ghz core cpu let alone mobile which is the target).

Seems like every time i scroll the list and an item is replaced by another, the new one seems to be recalculated from scratch or something but there shouldn't be a need for that cause all of the objects are the same (same X colors at X position for X elements minus the text change).

Android had a similar issue with their ListView but what they did was recycle the list element instead of Garbage Collecting it. This way maybe Graphic.Rebuild wouldn't be needed as much and Graphic.Refill() (if it existed) would be a better option? alt text P.S 1st time posing here, low experience with Unity, Using C#. Thanks in advance.

fpsproblem.png (235.9 kB)
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

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

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

Modify individual letters in new Unity UI Text 1 Answer

UI Text.color not assigning? 2 Answers

How to change color of text relative to current color? 1 Answer

How do I color exactly half of a word in TMPro UI text? 0 Answers

Text in ScrollView goes missing when Parent gets toggled 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