1
\$\begingroup\$

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

\$\endgroup\$

1 Answer 1

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, 2017 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, 2017 at 16:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .