Search Issue Tracker
Fixed in 2018.3.X
Votes
0
Found in
2017.4.4f1
Issue ID
1040277
Regression
No
[UI] InputFiled Character Limit causes ArgumentOutOfRange exception while selecting text in Inspector
How to reproduce:
1. Create UI -> InputField
2. Select InputField in Hierarchy and Change Content Type to Standart, Name, etc... in Inspector Window
3. Change Character Limit to 9
4. Enter Play Mode
5. Write any text into InputField in Game Window
6. While in Play Mode, Select InputField in Hierarchy
7. Under Text field, select whole written text and write anything else
Actual result: ArgumentOutOfRangeException: Argument is out of range.
Parameter name: index
System.Collections.Generic.List`1[UnityEngine.UICharInfo].get_Item (Int32 index) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections.Generic/Dictionary.cs:225)
UnityEngine.UI.InputField.SetDrawRangeToContainCaretPosition (Int32 caretPos) (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/InputField.cs:1826)
UnityEngine.UI.InputField.UpdateLabel () (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/InputField.cs:1694)
UnityEngine.UI.InputField.OnValidate () (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/InputField.cs:547)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
Reproduced with: 2017.1.4f1, 2017.2.3f1, 2017.4.4f1, 2018.1.2f1, 2018.2.0b5
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Character spacing value is not applied when using a specific font asset
- [Android][IL2CPP] Player crashes on __memcpy_aarch64_simd+276 when invoking native code via a plugin on some ARM64 Android devices
- [Android]Resources fail to load when the AAB build contains a large Addressables Bundle
- Unity is loading internal version of SharpZipLib instead of local version
- The Context Menu items are ordered incorrectly
michaeleconomy
Sep 19, 2020 20:29
I'm getting this on 2019.4.10f1
Eldirfar
Apr 08, 2019 18:07
Fix for LTS?