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
2
Question by Mockarutan · Jan 29, 2015 at 02:23 PM · uicursorinputfield

Hide cursor in InputField (4.6 UI)

I'm having some problem with the InputField in the new Unity 4.6. When i deactivate the gameobject, the cursor will not go away. I have tried to hide it by changing the color of it, but it wont work either. Try it your self, create a InputField, press play, select it for typing and deactivate it in the hierarchy. The cursor will stay visible (it does for me at least).

So anyone have any idea how to fix it?

Comment
Add comment · Show 6
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 SaraCecilia · Jan 29, 2015 at 02:22 PM 0
Share

Just use Screen.showCursor? http://docs.unity3d.com/ScriptReference/Screen-showCursor.html

avatar image Mockarutan · Jan 29, 2015 at 02:26 PM 0
Share

No, not the mouse cursor, the cursor that shows where you editor your string.

avatar image Derek-Wong · Jan 29, 2015 at 03:39 PM 0
Share

in my case that | sign disappear as ecpected after i click somewhere, can u tell which version of Unity you are using? 4.6.x?

avatar image alexk7 · Feb 18, 2015 at 06:54 AM 0
Share

I have the same issue. Setting focus to null via SetSelectedGameObject doesn't help

avatar image Fariel · Feb 18, 2015 at 07:41 AM 0
Share

Interested in a solution as I too have experienced this. I did some research a couple weeks ago and mostly found similar problems, but no answers.

Show more comments

2 Replies

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

Answer by Mockarutan · Feb 18, 2015 at 11:44 AM

So I solved it some time ago. The solution I found is to make the Input field non intractable without deactivating the GameObject or the Component. Then I deactivate all the different component that makes it visible, like the background image and text that holds what you input.

It's obviously not a clean solution, but i have tried everything. Just to spare you some time and not try this yourself. I tried rebuilding the UI DLLs with an added function that clears the vertex buffer that draws the cursor. That did not work because Unity want vertex buffer operations to happen in a special rendering stage during the frame. So when called out of order, you get an exception and nothing happens.

So hope that helps :)

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 sfx · Aug 06, 2015 at 03:10 PM 0
Share

Can you please post the code of your workaround? I have the same problem, but couldn't get it working here.

avatar image
0

Answer by EpicPandaGamer25 · Oct 03, 2015 at 02:38 PM

I fixed it using this code:

     public InputField nametextbox;
     public GameObject textbox;
     public GameObject ok;
     public GameObject text;
     public GameObject placeholder;
 
     
     public void SetName (string name) {
         PhotonNetwork.playerName = name;
         textbox.GetComponent<Image>().enabled = false;
         nametextbox.interactable = false;
         ok.SetActive (false);
         text.SetActive (false);
         placeholder.SetActive (false);
         Multiplayer ();
     }

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

8 People are following this question.

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

Related Questions

InputField "bug" editing text before last symbol 2 Answers

How to use onValidateInput in JavaScript? 1 Answer

Caret Position in InputField for android device 0 Answers

How to save InputField value? 1 Answer

Missing Input Field Cursor on Web Player 2 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