Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between "Single Line" and "Multi Line Submit" in unity text mesh pro

What is the difference between "Single Line" and "Multi Line Submit" in unity text mesh pro? Both of them call OnEndEdit Event when pressing Enter keyboard button.

like image 693
Dadkhah Dadkhah Avatar asked Sep 05 '25 17:09

Dadkhah Dadkhah


1 Answers

It is basically an extension of the UI.InputField so I would expect the same behavior as for a normal input field where you can find the option as UI.InputField.LineType

SingleLine
Only allows 1 line to be entered. Has horizontal scrolling and no word wrap. Pressing enter will submit the InputField.

MultiLineSubmit
Is a multiline InputField with vertical scrolling and overflow. Pressing the return key will submit.

MultiLineNewline
Is a multiline InputField with vertical scrolling and overflow. Pressing the return key will insert a new line character.


here someone implemented a script to be able to type new lines using Shift+Enter when using the MultiLineSubmit option.

like image 69
derHugo Avatar answered Sep 07 '25 17:09

derHugo