Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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
1
Question by TrevorStricker · Jan 15, 2015 at 04:14 PM · uitextscrollinglog

Scrollable Text of Arbitrary Length

The new Text component seems to have a limit of 16,384 characters. I'm building a scrollable log window that needs to be able to store an arbitrary amount of text. It's nice that Unity supports attaching a scrollbar to a scroll rect, but this won't work for large amounts of text.

I could write a script that links a scrollbar to a potentially large amount of text, and populates a text component with just the visible text of a much larger document. But that's a pain in the ass. It also seems like pretty basic functionality. Does something like this already exist, that I haven't been able to find?

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 VesuvianPrime · Jan 15, 2015 at 04:14 PM 0
Share

$$anonymous$$y experience is with NGUI, so fogive me if this is not an appropriate workaround:

Perhaps you could split your text into "page" GameObjects, and have your scrolling window populated with those pages.

avatar image TrevorStricker · Jan 15, 2015 at 04:24 PM 0
Share

I could do something like that. Break the text into pages. Have at most two pages visible at a time. But that would be work to implement. I'm hoping somebody has already written something like this, or there's an obvious solution that I am missing.

I can't be the only person to ever want this type of thing.

avatar image Mmmpies · Jan 15, 2015 at 04:38 PM 0
Share

I've created a scroll panel that expand to fit its contents then add each new piece of text as a different Text component.

Not got access to Unity at the moment but look on Youtube for Richard Gubb as he does a tutorial with buttons filling a panel that its based on.

Ill post the code when I get back to my Unity PC if you still dont have an answer by then.

EDIT:

That's a fair point, hadn't realized just how much info you had, that's pretty much a bookcase worth! Not sure I can help but if it gives anyone else any ideas how are you storing the text? In a database, just a text file or some other method?

avatar image TrevorStricker · Jan 15, 2015 at 05:31 PM 0
Share

For a massive amount of text, the scroll panel would have to be massive as well. That might work fine for a page or two, but with 100 mb of data I can't imagine that working.

It would just need to display a small part of a larger amount of data. $$anonymous$$aybe it calculates what to put into a pre sized Text object? $$anonymous$$aybe, as VesuvianPrime suggested, it could break the data into pages and only display one or two at a time?

I just can't imagine something like this hasn't already been written.

avatar image jemonsuarez · Oct 23, 2016 at 06:39 AM 0
Share

I had the same problem with a console log of a communication server, finally I decided to show the last ~150 entry lines and save every older entry to a log file. I'm still looking for a better solution too.

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

How can I handle console logging, large amount of text over time 0 Answers

How to make text that scrolls horizontally? 2 Answers

How Too Scrolling UI Text Message Centre 1 Answer

How Does One Make TextMeshPro InputFields Scroll Appropriately When Their Text Components are Bottom-Aligned? 0 Answers

How to make parent UI element change size to fit children? 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