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
- Crash on PrepareDrawShadowsCommandStep1 when entering the Play Mode in a specific project
- Physics Layer Collision Matrix's Layer names, checkboxes and hover highlights become misaligned when the Editor's UI Scaling gets changed
- Light/shadow information on an edge of a Terrain tile creates a seam with an adjacent Terrain tile when baking a LightMap
- "Missing types referenced from component UniversalRenderPipelineGlobalSettings on game object UniversalRenderPipelineGlobalSettings..." warning is thrown after switching the Platform to tvOS
- “Metal: Error creating pipeline state (Universal Render Pipeline/2D/Sprite-Lit-Default): Vertex attribute BLENDINDICES0(5) of type uint4 cannot be read using MTLAttributeFormatFloat2 (null)“ when setting GPU Skinning to GPU after opening the project
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.