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
3
Question by whidye · May 06, 2015 at 03:17 PM · inputfieldartifacts

How can I disable the InputField Input Caret in Unity 5?

I am having a weird graphical artifact problem when entering text into InputField - large colored boxes or weird shapes that exist in the scene, but not as an object of any kind. I believe I have tracked it down to the Input Caret, but I have been unsuccessful in finding any way to disable this or remedy the issue.

Any help is appreciated! Here is the best related issue I have found (GREGERSRIDDARE's comment) http://issuetracker.unity3d.com/issues/inputfield-disabling-inputfields-gameobject-does-not-disable-the-caret

Thanks!

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

4 Replies

· Add your reply
  • Sort: 
avatar image
2

Answer by AdayMelian · Jan 04, 2017 at 10:11 AM

I removed Caret by setting it with a custom color with 0 Alpha.

It worked well!

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 yoannG · Jun 15, 2018 at 08:16 AM 0
Share

I thought of the same, it worked indeed =)

avatar image
1

Answer by Fattie · Jul 19, 2015 at 11:51 AM

You're 100% correct.

It's a complete fuck-up by Unity.

It's extremely hard to deal with those weird shapes that appear, and somtimes the Caret "stays there".

Incredibly annoying. You have to wonder if Unity test ANYTHING.

Could not find a work around. The work around is use another game engine.

Here's kind of a workaround...

 public void PinUnlocked()
     {
     your code here;
     Invoke("_removepin", .1f);
     // WAIT BEFORE REMOVING THE INPUT FIELD...
     }
 private void _removepin()
     {
     levelPin.GetComponent<InputField>().text = "";
     UnityEngine.EventSystems.EventSystem.
                      current.SetSelectedGameObject(null);
     // DO THOSE TWO THINGS
     levelPin.SetActive(false);
     // AND DO THAT .. AND ...
     Invoke("_caremsg", .1f);.
     }
 private void _caremsg()
     {
     //AND WAIT, BEFORE, DOING THIS .....
     your code to some other message on screen;
     }


Hope it helps someone.

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
avatar image
0

Answer by fullstack · Aug 05, 2015 at 12:50 PM

As a workaround, adding a "Canvas Group" and setting alpha value to 0 solves that issue.

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 maiko · Jun 11, 2016 at 07:36 AM 0
Share

Adding Canvas Group to What?

avatar image
0

Answer by IcyHammer · Aug 16, 2015 at 12:20 PM

Oh I remember this nasty bug. I used inputField.caretPosition = 0 and it worked for me.

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 misun1191 · Nov 06, 2015 at 10:50 AM 0
Share

I got this inaccessibility error by inserting 'inputField.caretPosition=0' in my script.. BCE0120: 'UnityEngine.UI.InputField.caretPosition' is inaccessible due to its protection level.

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

9 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Textmesh Pro Input Field Rich Text 3 Answers

set default value for inputfield with script 1 Answer

How to add input field into this? 1 Answer

How do I type my own paramater in a function on an input field? 2 Answers

TMP InputField does not fire onTouchScreenKeyboardStatusChanged event when keyboard becomes visible 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