Author Topic: Android and IOS multiline UIInput  (Read 3262 times)

BeardOfFury

  • Guest
Android and IOS multiline UIInput
« on: December 06, 2013, 12:26:00 AM »
Hey there,

I've tried searching for this through google and the asset store(the two NGUI UIInput extensions), but I can't seem to find a solution for multiline text input on mobile devices. For instance in the game i'm working on the user can upload an image to Facebook with a pre filled multiline caption that they can edit. In the editor this works fine, but on IOS and Android it brings up the virtual keyboard with a single line with no line endings even visible.

Now I'd love for this to be single line to make it easier but this is contract work and they want multi line.

Is there a way around this? Have I selected the wrong input type or something? I'd either like to have the virtual keyboard text input multi line or to be able to edit the field directly like a multiline EditText on Android.

Thanks in advance.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Android and IOS multiline UIInput
« Reply #1 on: December 06, 2013, 03:59:58 AM »
Well, I suppose the better question is -- does Unity expose this?

I see no mention of how to make a field multi-line in the docs: http://docs.unity3d.com/Documentation/Manual/MobileKeyboard.html

BeardOfFury

  • Guest
Re: Android and IOS multiline UIInput
« Reply #2 on: December 08, 2013, 05:40:50 PM »
Ah, here it is:

http://docs.unity3d.com/Documentation/ScriptReference/TouchScreenKeyboard.Open.html

You can flag a bool for multiline. Would it be worth including as a flag for UIInput?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Android and IOS multiline UIInput
« Reply #3 on: December 08, 2013, 07:20:27 PM »
Done, I made it simply use the label's multiline setting.

BeardOfFury

  • Guest
Re: Android and IOS multiline UIInput
« Reply #4 on: December 08, 2013, 10:38:02 PM »
Awesome  :)