Search Issue Tracker
Fixed in 1.5.0-preview.12, 2.1.0-preview.12, 3.0.0-preview.12
Votes
0
Found in [Package]
3.0.0-preview.11, 3.0.0-preview.5, 3.0.0-preview.1
Issue ID
1242936
Regression
No
[TMP] ArgumentOutOfRangeException thrown on selecting "Update Sprite Asset" from "Sprite Asset" in the Inspector
When "Update Sprite Asset" is selected after creating "Sprite Asset" in the Inspector, it causes the editor to throw ArgumentOutOfRangeException, refer attached video.
Steps to reproduce:
1. Create a new project with 3D Template
2. Import any Texture in the project
3. Texture > Create > TextMeshPro > Sprite Asset
4. Select Sprite Asset > Inspector > Update Sprite Asset
Actual Result:
ArgumentOutOfRangeException is thrown on updating Sprite Asset
Expected Result:
Sprite Asset is updated without throwing any error in the console
Note: Update Sprite Asset is introduced in TMP package version: 3.0.0-preview.1
Occurring on:
2020.2.0a10, 2020.1.0b7, 2019.3.12f1 with package version 3.0.0-preview.11, 3.0.0-preview.5, 3.0.0-preview.1
Environment:
Windows10 and macOS 10.14
Stack trace:
ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
System.ThrowHelper.ThrowArgumentOutOfRangeException (System.ExceptionArgument argument, System.ExceptionResource resource) (at <fb001e01371b4adca20013e0ac763896>:0)
System.ThrowHelper.ThrowArgumentOutOfRangeException () (at <fb001e01371b4adca20013e0ac763896>:0)
TMPro.EditorUtilities.TMP_SpriteAssetMenu.UpdateSpriteAsset (TMPro.TMP_SpriteAsset spriteAsset) (at library/packagecache/com.unity.textmeshpro@3.0.0-preview.11/scripts/editor/tmp_spriteassetmenu.cs:144)
TMPro.EditorUtilities.TMP_SpriteAssetEditor.OnInspectorGUI () (at library/packagecache/com.unity.textmeshpro@3.0.0-preview.11/scripts/editor/tmp_spriteasseteditor.cs:121)
UnityEditor.UIElements.InspectorElement+<>c__DisplayClass58_0.<CreateIMGUIInspectorFromEditor>b__0 () (at <599a88f0dc984e9a84071cb802b80734>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
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
- Mono Windows Builds don't produce full log callstacks when generating logs
- AssetBundles fail to load when running in Built Players for Mobile Devices
- UI elements with text gets bigger and grey when Player window is moved to another screen with different resolution
- System name accepts multiline text but crops it on confirmation, duplicates input, and shrinks the field when empty
- UI element scale and position are wrong in project build when DRS is changed with HDR and Software Dynamic Resolution enabled
Resolution Note (fix version 1.5.0-preview.12, 2.1.0-preview.12, 3.0.0-preview.12):
This issue has been resolved.
The fix will be included in the next release of the TMP package which is likely to be version 1.5.0-preview.12 for Unity 2018.4, version 2.1.0-preview.12 for Unity 2019.x and version 3.0.0-preview.12 for Unity 2020.x.