playMaker

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

Jos Yule

  • Playmaker Newbie
  • *
  • Posts: 33
    • View Profile
[FIXED] GUILayout Text Field ignoring Max Length
« on: May 11, 2012, 11:47:50 AM »
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, 03:48:17 PM by Alex Chouls »

Alex Chouls

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