It is extremely frustrating for the ‘Apply’ button to revert changes in the Sprite Editor, especially when working on a complex rigged sprite.
I noticed that the following error came up the last time it happened.(Presumably the other times, too, but I didn’t notice then.)
ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
System.ThrowHelper.ThrowArgumentOutOfRangeException (System.ExceptionArgument argument, System.ExceptionResource resource) (at <695d1cc93cca45069c528c15c9fdd749>:0)
System.ThrowHelper.ThrowArgumentOutOfRangeException () (at <695d1cc93cca45069c528c15c9fdd749>:0)
UnityEditor.U2D.Animation.MeshCache.GetWeight (System.Int32 index) (at Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/SkinningCache/MeshCache.cs:87)
UnityEditor.U2D.Animation.SpriteMeshDataController.GetMultiEditChannelData (UnityEditor.U2D.Animation.ISelection`1[T] selection, System.Int32 channel, System.Boolean& enabled, System.Int32& boneIndex, System.Single& weight, System.Boolean& isEnabledMixed, System.Boolean& isBoneIndexMixed, System.Boolean& isWeightMixed) (at Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/SpriteMeshData/SpriteMeshDataController.cs:419)
UnityEditor.U2D.Animation.WeightInspector.ChannelsGUI () (at Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/IMGUI/WeightInspector.cs:58)
UnityEditor.U2D.Animation.WeightInspector.OnInspectorGUI () (at Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/IMGUI/WeightInspector.cs:40)
UnityEditor.U2D.Animation.WeightInspectorIMGUIPanel.OnGUI () (at Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/UI/WeightInspectorIMGUIPanel.cs:41)
UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <6aef74cd6e9c4a708ea4a51c97de39d4>:0)
UnityEditor.EditorApplication:Internal_CallUpdateFunctions()