System.ArgumentOutOfRangeException: Argument is out of range.
Parameter name: index
at System.Collections.Generic.List`1[UnityEngine.UICharInfo].get_Item (Int32 index) [0x0000c] in /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Collections.Generic/List.cs:633
at UnityEngine.UI.InputField.CalculateTextVisibility (UnityEngine.TextGenerator result, System.Int32& newDrawStart, System.Int32& newDrawEnd) [0x001f5] in C:\BuildAgent\work\d63dfc6385190b60\Extensions\guisystem\guisystem\UI\Core\InputField.cs:1261
at UnityEngine.UI.InputField.UpdateLabel () [0x00121] in C:\BuildAgent\work\d63dfc6385190b60\Extensions\guisystem\guisystem\UI\Core\InputField.cs:1074
at UnityEngine.UI.InputField.DeactivateInputField () [0x0005f] in C:\BuildAgent\work\d63dfc6385190b60\Extensions\guisystem\guisystem\UI\Core\InputField.cs:1638
at UnityEngine.UI.InputField.OnDeselect (UnityEngine.EventSystems.BaseEventData eventData) [0x00007] in C:\BuildAgent\work\d63dfc6385190b60\Extensions\guisystem\guisystem\UI\Core\InputField.cs:1650
at UnityEngine.EventSystems.ExecuteEvents.Execute (IDeselectHandler handler, UnityEngine.EventSystems.BaseEventData eventData) [0x00000] in C:\BuildAgent\work\d63dfc6385190b60\Extensions\guisystem\guisystem\EventSystem\ExecuteEvents.cs:108
at UnityEngine.EventSystems.ExecuteEvents.Execute[IDeselectHandler] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.EventFunction`1 functor) [0x00087] in C:\BuildAgent\work\d63dfc6385190b60\Extensions\guisystem\guisystem\EventSystem\ExecuteEvents.cs:257
UnityEngine.EventSystems.EventSystem:Update()
I have reduced the problem to a small example file. The cause seems to be the character limit. I have submitted the problem as a bug report yesterday. But didn’t receive a message from QA yet what bug number it is. So just in case, here comes the dataset as an attachment too. The example project and a screenshot.
Load the project, run the app, in the input field type in a value that is above the character limit of the input field, and you will get a out of range exception when you hit enter.
Hm, seems that the bug didn’t made it into the tracker. Two days gone, no confirmation mail. Should i resubmit the bug report? Or is this thread here enough?
You mean you can’t even see text? Make sure you add a Layout Element and set a MinHeight to something high enough to prevent the text object from clipping.
I hate to cross-promote, but maybe use some UI wrapper library that handles the crazy for you?
I noticed your Pos Y is -300, is this expected? Also check the design tab and make sure the text field and its children are where you think they are. Sometimes you’ll see they have a height of 0, or are way out in lala land outside the camera.