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 · Jan 09, 2015 at 11:37 AM · uitextinputfieldedit

InputField "bug" editing text before last symbol

Hello I have found 1 thing, which is very annoying. I am not sure, is it bug or not, but anyway I didnt find any solution So, If to edit text in GameObject with InputField and Text components, putting cursor before last character in text field, then remove all previous symbols (Backspace) and enter new value, the last character (which is positioned after mouse cursor) will hide and reveal only after EndEdit event. In practice that mean - if we got value 1580 in text field, and we want to change it to 2550, we put cursor between 8 and 0, remove 1 and 5, enter 255, and we see that value in text field is not a 2550, but 255. Of course we adding one more 0, and after finish editing get 25500 instead of 2550... Does someone know how to fix it?

Comment
Add comment · Show 1
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 bakwards · Jun 17, 2015 at 10:00 AM 0
Share

You don't need to remove the start of the string to get the problem, even setting the caret before the last character and typing anything will hide the last character - and people will inevitably add the missing character, potentially invalidating the input. I have not found a solution to this problem yet, anyone?

2 Replies

· Add your reply
  • Sort: 
avatar image
3
Best Answer

Answer by bakwards · Jun 17, 2015 at 10:00 AM

I found a solution! I have NO idea why this works exactly!

On Value Change for the input field, I add this function referencing the Input Field:

 public void FixString(InputField target){
     target.lineType = InputField.LineType.MultiLineSubmit;
     target.textComponent.SetAllDirty();
     target.lineType = InputField.LineType.SingleLine;
 }

The last character is left untouched and I can stay in singleline! Weird stuff!

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 Sphax84 · Jul 25, 2017 at 11:55 AM 0
Share

For information: This bug is fixed (not reproduceable) in 5.5.3f1

avatar image
0

Answer by bakwards · Jun 17, 2015 at 10:00 AM

If I change the Line Type of the Input Field to any Mutli Line type, the problem goes away - but I'd like to not have the problem on single lines either...

Comment
Add comment · 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

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

UI InputField text sometimes invisible? 1 Answer

[4.6 UI][JS] Focusing on InputField issues. 1 Answer

Highlight particular character in InputField 0 Answers

How to convert text field to input field and back again? 0 Answers

Input Field Doesn't auto select in a different scene 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