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
- Errors "InvalidOperationException: Trying to use a texture (_InternalGradingLut)..." and “Render Graph Execution error” shown and Scene turns black when 16 or more Render Objects are used
- GameObjects in the Game View are rendered differently than in the Scene View when the Rendering Path is set to "Deferred" and Screen Space Shadows Renderer Feature is added
- Errors “InvalidOperationException: Trying to use a texture (_CameraDepthTexture)...” and “Render Graph Execution error” shown when selecting GameObjects with Mesh Renderer from the Hierarchy
- macOS stutters in a minimal project
- [Usability] HDRP Wizard calls for VR fixes when opening the HDRP Wizard a second time after they have already been applied and the Wizard has finished checking
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.