Strange problem with Input Field (don't work the same as in the Editor)

Hi,

I’ve a pretty strange problem on an InputField: When I press the Return key in order to validate it, a ‘\n’ character is added to the end of the text. As I’m doing a chat system it’s pretty anoying. However, the ‘\n’ don’t appears when I am testing my game in the editor. My InputField has the Single Line option. And I’m on a mac.

Do you have any idea ?

Don’t know why it happens, but here’s your answer:

myString = myString.Remove ("\n");

Thank you, I’ve done a similar thing:

msg = msg.Replace("\n", "");

But it’s still annoying…