Search Issue Tracker
By Design
Votes
0
Found in [Package]
3.0.0-preview.11, 3.0.0-preview.1, 2.0.1, 2.0.0, 1.4.0, 1.3.0
Issue ID
1242974
Regression
No
[TMP] ArgumentNullException thrown on Creating "Sprite Asset" from TextMeshPro in the Project window
When "Sprite Asset" is created from TextMeshPro in the Project window, it causes the editor to throw ArgumentNullException, refer the attached video.
Steps to reproduce:
1. Create a new project with 2D Template
2. Import any Sprite in the project
3. Sprite > Create > TextMeshPro > Sprite Asset
Actual Result:
ArgumentNullException is thrown on creating Sprite Asset
Expected Result:
Sprite Asset is created without throwing any error in the console
Occurring on:
2020.2.0a10, 2020.1.0b7, 2019.3.12f1, 2019.2.13f1, 2019.1.11f1, 2018.4.14f1
with package version 3.0.0-preview.11, 3.0.0-preview.1, 2.0.1, 2.0.0, 1.4.0, 1.3.0
Environment:
Windows10 and macOS 10.14
Stack trace:
ArgumentNullException: Value cannot be null.
Parameter name: shader
UnityEngine.Material..ctor (UnityEngine.Shader shader) (at <9fed455f2a0f419e99c9093c831550e0>:0)
TMPro.EditorUtilities.TMP_SpriteAssetMenu.AddDefaultMaterial (TMPro.TMP_SpriteAsset spriteAsset) (at Library/PackageCache/com.unity.textmeshpro@3.0.0-preview.11/Scripts/Editor/TMP_SpriteAssetMenu.cs:295)
TMPro.EditorUtilities.TMP_SpriteAssetMenu.CreateSpriteAsset () (at Library/PackageCache/com.unity.textmeshpro@3.0.0-preview.11/Scripts/Editor/TMP_SpriteAssetMenu.cs:190)
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
- Unity Perforce Integration: VCS Connection Active State Fails via CLI with Valid Inputs
- Joint Gizmos for anchor and connectedAnchor do not respect their defined bodies when Swap Bodies is enabled
- Project Settings window opens up with a blank details pane when the "Configure" button is clicked in the Package Manager after installing the Cloud Diagnostics package
- [UI Builder] Viewport's gizmos for Margin and Padding disappear when dragging to modify the value and the cursor leaves the Spacing section
- "Multiplayer Center" window does not reflect changes made in "Other Packages" section
Resolution Note:
Since the TMP Essential Resources which includes the shaders has not been imported in the project, trying to create assets that use some of those essential resources will not work and produce errors.
Please import the TMP Essential Resources which will resolve this issue and enable you to create Sprite Assets.