Hi,
When building my project I'm getting the following exception:
UnityEngine.MissingReferenceException: The object of type 'Mesh' has been destroyed but you are still trying to access it.
Your script should either check if it is null or you should not destroy the object.
at (wrapper managed-to-native) UnityEngine.Mesh.ClearImpl(UnityEngine.Mesh,bool)
at UnityEngine.Mesh.Clear () [0x00001] in /Users/bokken/buildslave/unity/build/Runtime/Export/Graphics/Mesh.cs:1206
at Spine.Unity.MeshRendererBuffers+SmartMesh.Clear () [0x00001] in /Assets/Spine/Runtime/spine-unity/Mesh Generation/MeshRendererBuffers.cs:116
at Spine.Unity.MeshRendererBuffers.Initialize () [0x00020] in /Assets/Spine/Runtime/spine-unity/Mesh Generation/MeshRendererBuffers.cs:48
at Spine.Unity.SkeletonRenderer.Initialize (System.Boolean overwrite, System.Boolean quiet) [0x000c1] in /Assets/Spine/Runtime/spine-unity/Components/SkeletonRenderer.cs:396
UnityEngine.Debug:LogError (object)
Spine.Unity.SkeletonRenderer:Initialize (bool,bool) (at Assets/Spine/Runtime/spine-unity/Components/SkeletonRenderer.cs:398)
Spine.Unity.SkeletonAnimation:Initialize (bool,bool) (at Assets/Spine/Runtime/spine-unity/Components/SkeletonAnimation.cs:169)
Spine.Unity.Editor.SpineEditorUtilities:SetupSpinePrefabMesh (UnityEngine.GameObject,UnityEditor.AssetImporters.AssetImportContext) (at Assets/Spine/Editor/spine-unity/Editor/Utility/SpineEditorUtilities.cs:123)
Spine.Unity.Editor.SpineBuildProcessor:PostprocessBuild () (at Assets/Spine/Editor/spine-unity/Editor/Utility/SpineBuildProcessor.cs:75)
Spine.Unity.Editor.SpineBuildPostprocessor:UnityEditor.Build.IPostprocessBuildWithReport.OnPostprocessBuild (UnityEditor.Build.Reporting.BuildReport) (at Assets/Spine/Editor/spine-unity/Editor/Utility/SpineBuildProcessor.cs:119)
UnityEditor.BuildPlayerWindow:BuildPlayerAndRun () (at /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPlayerWindow.cs:123)
I'm using spine-unity-4.0-2022-01-19.unitypackage with com.esotericsoftware.spine.urp-shaders-4.0-2019.1.
This error repeats for all of the SkeletonAnimation components that are used in the project.
Any idea how I can prevent that?
Thanks