1
\$\begingroup\$

Can I make an input field with non selectable text in Unity?

\$\endgroup\$
1
\$\begingroup\$

You can make InputFields non selectable by setting enabled to false.

inputfield.enabled = false;

This will disable input though.

Use the API documentation to experiment with the input field: https://docs.unity3d.com/460/Documentation/ScriptReference/UI.InputField.html

\$\endgroup\$
2
  • \$\begingroup\$ I meant the text in the input field, if you select the text the background will become blue. \$\endgroup\$
    – xuwenbuwer
    Jul 30 '17 at 15:22
  • \$\begingroup\$ Yes, disabling the input stops you being able to select text. Keeping text navigation and input functionality will always have the blue effect on that control. \$\endgroup\$ Jul 30 '17 at 16:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.