playMaker

Author Topic: [FIXED] GUILayout Text Field ignoring Max Length  (Read 4343 times)

Jos Yule

  • Playmaker Newbie
  • *
  • Posts: 33
[FIXED] GUILayout Text Field ignoring Max Length
« on: May 11, 2012, 02:47:50 PM »
Looking at the GUILayoutTextField.cs, it seems you are using the following method signature to call GUILayout.TextField() :


static function TextField (text : String, style : GUIStyle, params options : GUILayoutOption[]) : String

I'd suggest you use the following method signature:

static function TextField (text : String, maxLength : int, style : GUIStyle, params options : GUILayoutOption[]) : String

So, you can send the default maxLength value here, or actually use the value the user has selected.

ps. here is the link to the Unity docs about GUILayout.TextField() - http://unity3d.com/support/documentation/ScriptReference/GUILayout.TextField.html

pps. This is using Unity 3.5 and PM 1.3.3
« Last Edit: July 02, 2012, 06:48:17 PM by Alex Chouls »

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: GUILayout Text Field ignoring Max Length
« Reply #1 on: May 11, 2012, 05:24:07 PM »
Thanks! It's fixed for the next update...