1

As I am trying to run my game, it displays the following error:

Unity Error, Cannot initialize non-default texture with negative or zero width, UnityEngine.Texture2D:Resize (int,int,UnityEngine.TextureFormat,bool) TMPro.TMP_FontAsset:ClearAtlasTextures (bool) (at ./Library/PackageCache/com.unity.textmeshpro@3.0.6/Scripts/Runtime/TMP_FontAsset.cs:2846)

And when I click on it, it directs me to the TMP code line:

if (setAtlasSizeToZero)
            {
                texture.Resize(0, 0, TextureFormat.Alpha8, false);
            }

I am not sure what to do, since I cannot modify this code.

I think It has to do with the TextMeshPro version, I tried updating it, but the pre version is not visible, I tried installing it, it doesn't work, Any alternative solution?

derHugo
  • 83,094
  • 9
  • 75
  • 115
safae
  • 11
  • 2

1 Answers1

0

Create a new project copy Library/ScriptAssemblies/Unity.TextMeshPro.dll from it to the problem project and the problem should be fixed

xaoxto
  • 1