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
- Rigidbody2D.Slide API does not have the needed configuration when creating a 2D Top-Down character controller
- Opening reference for "Playables"component redirects to a missing page
- Sprite Renderer image is changed when switching Mask Interaction and changing Sprite to a shared Sprite
- An unsigned integer is not compared with an integer correctly in player when using IL2CPP backend
- Graphical artifacts are being rendered in Scenes that are loaded during run-time when GPU Resident Drawer is turned on
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.