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 yotwerde · Sep 05, 2018 at 08:01 PM · uiinputfield

InputField limits characters unwantedly, even with no character limit

I tried pasting Jane Austen's Emma from the Gutenberg Project into an InputField (only the actual book, not what's before and after it), which has no character limitation at all (all settings are the default ones), and it limits the text to stop at "“A straightforward, open-hearted man like Weston, and a rational, unaffected woman like Miss Taylor, may be safely left to m" (last sentence shown in the field), which is located in the first chapter (Ctrl+F'ed to find it).
LibreOffice Writer shows that the whole text has a character count of 874,323 characters, including spaces. (Tools->Word Count...)
The text that my input field contains is a mere 16,214 (likewise with spaces).
It has surely nothing to do with the copied text, as I pasted it into a doc in LO Writer and it's whole there.
Anyone knows why this happens? Does Unity limit characters even in limitless InputFields and I have just surpassed the limit? Or do I have a setting wrong?
Thanks.

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 Vicarian · Sep 05, 2018 at 08:13 PM 1
Share

I think it's on Unity's end. It likely limits allocation to 2^14 bytes with a bit of overhead.

avatar image yotwerde Vicarian · Sep 06, 2018 at 07:26 AM 0
Share

Sounds reasonable. Is there any way to find out for sure? One question though: 2^14=16384 bytes. Chars in Unity have a size of 2 bytes. Wouldn't that equal to approximately 16384/2=8192 characters (as strings are collections of chars)?

avatar image Bunny83 yotwerde · Sep 07, 2018 at 11:19 PM 1
Share

It's more likely that the limitation might be related to how the text is actually rendered. If a mesh is used and each character is a single quad you need 4 vertices per character. This would explain the 64k vertices limit --> 16k characters.

Show more comments

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by I5 · Sep 11, 2018 at 05:26 PM

Try manually, or through code, setting and/or printing out the InputFields char limit (see here) to see if it has some shorter default. Or just set it to 0 (which is infinite, so no, there doesn't appear to be a limit)

Also, when pasting from other applications (such as LibreOffice), there's ALWAYS hidden characters that you cant see, but that may be messing things up in Unity. To get around this, try saving the text into a pure text file (.txt) format, with no special/hidden characters, and then paste it into the InputField. Or, better yet, read the text input using code, and then set the text of the InputField using the same code.

Comment
Add comment · Show 1 · 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 yotwerde · Sep 12, 2018 at 07:45 AM 0
Share

The InputFields character limit is 0, because, as I said, I left all the settings to the default ones, which, for the character limit, is 0 (also evaluated/checked it through code). I also wasn't pasting the text from LibreOffice but from a .txt file, just used Libre for the word and character count.

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

153 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

Related Questions

Changing just the name of person in UI Text 0 Answers

Hide Textselection in Scrollable Inputfield 1 Answer

How do I change "return"/"submit" button to "search" in native android keyboard in TMP_InputField? 1 Answer

Prevent focus from leaving inputfield 0 Answers

Color specific words in Input Field 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