2D Toolkit Forum
2D Toolkit => Support => Topic started by: Allen on March 30, 2014, 12:34:21 am
-
Hello,
You can download a project that exhibits the problem here: Link removed
Type a space into the text input and you will get an index out of range exception because tk2dFontData.chars is empty. I am using a custom font that was generated from BMFont which is included in the attached project. It has been created in a sprite collection with all three platforms.
I am using 2D Toolkit 2.4.0.
This is the stack trace:
IndexOutOfRangeException: Array index is out of range.
tk2dUITextInput.SetCursorPosition () (at Assets/TK2DROOT/tk2dUI/Code/Controls/tk2dUITextInput.cs:426)
tk2dUITextInput.set_Text (System.String value) (at Assets/TK2DROOT/tk2dUI/Code/Controls/tk2dUITextInput.cs:158)
tk2dUITextInput.ListenForKeyboardTextUpdate () (at Assets/TK2DROOT/tk2dUI/Code/Controls/tk2dUITextInput.cs:304)
tk2dUIManager.Update () (at Assets/TK2DROOT/tk2dUI/Code/Core/tk2dUIManager.cs:324)
Please let me know when this is resolved so I can re-generate my font to not have this problem.
Thanks,
Allen
-
Hi this looks like its a bug with uitextinput and platform fonts.
Bugfix attached:
-
Thanks! ...Except I can't for the life of me find your attachment! Would you mind re-attaching?
-
Hi, Are you still having issues seeing the attachment?
-
No, I can see the attachment now! Thanks for your help.
I'm sure it's my fault that I didn't read a sticky somewhere that you need to be a part of the group... But if there is any way to mod the forum so that it shows "Attachment hidden because you're not a part of the group" message where the attachment would normally be, that would definitely be a little less confusing.
Thanks for your hard work, I'll give this fix a try...
-
Yep, that fixed it! Thanks for your help!
While looking at this bug, I also noticed that TOUCH_SCREEN_KEYBOARD is not defined for UNITY_BLACKBERRY... To me this suggests that Unity doesn't support blackberry's touch keyboard, but I don't think that's true.
Anyway, I'll give it a shot sometime latter so see if it is supported or not. Thanks again!
-
Hi it should probably be ticked, but I don't have Unity blackberry or any blackberry devices to test this on, so the official line is - we don't officially support that platform. It should work though, and you're right you'll need to add that define.
-
Ah, perfect, I'll give it a shot. :) Thanks again!