Write in button

Is it possible to make a button “writable”? I have a UI Button in a scene and i wanted to write on it when i am on play mode. Is it possible? If so, how do i do that?

As far as I know it is not possible, because a button returns true if it is was clicked and no string. Usually you take a text field for text input. You can only use what Unity provides, use a third party solution or write your own writable button class.


Are you asking how to change a button’s text with input?

  • Create a Button and an InputField, hide the InputField by moving it offscreen.
  • In the Button’s OnClick() events, drag in the InputField.Select() function.
  • In the InputField’s OnValueChanged() events, drag in the Button’s Text (child object) and select the Text.text property.

If you are asking how to edit properties and keep the changes when playmode is done, then I’m not sure.