I was working on an animation and suddenly I have this massive compile error.
InvalidOperationException: Stack empty.
System.Collections.Generic.Stack1[T].ThrowForEmptyStack () (at <14e3453b740b4bd690e8d4e5a013a715>:0) System.Collections.Generic.Stack
1[T].Pop () (at <14e3453b740b4bd690e8d4e5a013a715>:0)
UnityEditor.MaterialEditor.EndAnimatedCheck () (at :0)
TMPro.EditorUtilities.TMP_BaseShaderGUI.EndProperty () (at Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_BaseShaderGUI.cs:249)
TMPro.EditorUtilities.TMP_BaseShaderGUI.DoTilingOffset (UnityEngine.Rect rect, UnityEditor.MaterialProperty property) (at Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_BaseShaderGUI.cs:323)
TMPro.EditorUtilities.TMP_BaseShaderGUI.DoTexture (System.String name, System.String label, System.Type type, System.Boolean withTilingOffset, System.String[ ] speedNames) (at Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_BaseShaderGUI.cs:295)
TMPro.EditorUtilities.TMP_BaseShaderGUI.DoTexture2D (System.String name, System.String label, System.Boolean withTilingOffset, System.String[ ] speedNames) (at Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_BaseShaderGUI.cs:272)
TMPro.EditorUtilities.TMP_SDFShaderGUI.DoFacePanel () (at Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_SDFShaderGUI.cs:191)
TMPro.EditorUtilities.TMP_SDFShaderGUI.DoGUI () (at Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_SDFShaderGUI.cs:64)
TMPro.EditorUtilities.TMP_BaseShaderGUI.OnGUI (UnityEditor.MaterialEditor materialEditor, UnityEditor.MaterialProperty[ ] properties) (at Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_BaseShaderGUI.cs:156)
UnityEditor.MaterialEditor.PropertiesGUI () (at :0)
UnityEditor.MaterialEditor.OnInspectorGUI () (at :0)
UnityEditor.UIElements.InspectorElement+<>c__DisplayClass58_0.b__0 () (at :0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
It is followed by another eight similar errors. I can’t run any test plays with my game, and I never edited ANY code here, much less anything within these packages that have been working perfectly.
This looks like a Unity wedge… close Unity and reopen.
If that doesn’t fix it, underneath your specific project (right next to Assets and ProjectSettings) there is a folder called Library/ScriptAssemblies/
and you can also try exiting Unity, deleting that folder, then opening Unity.