Open Jinenji opened 2 years ago
I've had this reported to me before but have never been able to reproduce it.
What version of Unity are you using? Maybe it is related to that. I will investigate again.
V. 2020.3.23f1
That said, after hearing that it's inconsistent and looking at some of the related code I wonder if Odin Inspector isn't interacting in some bizarre way.
When I get a sec I'll do some testing on a smaller project.
I haven't been able to replicate on a smaller project. Odin Inspector doesn't seem to be causing it.
I did notice an error when I delete a composite list (in my larger project). The stack track follows, not sure it will help you that much. Looks like something may have gotten into an invalid state? That said, all pre-processors and modules I have in the current project exhibit the same problem.
InvalidOperationException: Stack empty. System.Collections.Generic.Stack
1[T].ThrowForEmptyStack () (at <0463b2ef957545c0a51b42f372cd4fbb>:0) System.Collections.Generic.Stack
1[T].Pop () (at <0463b2ef957545c0a51b42f372cd4fbb>:0) UnityEditor.EditorGUI.EndProperty () (at:0) UnityEditorInternal.ReorderableList.DoListHeader (UnityEngine.Rect headerRect) (at :0) UnityEditorInternal.ReorderableList.DoLayoutList () (at :0) MxMEditor.AnimationPreProcessDataInspector.OnInspectorGUI () (at Assets/Plugins/MotionMatching/Code/MxM/Editor/Inspectors/MxMPreProcessDataInspector.cs:704) UnityEditor.UIElements.InspectorElement+<>c__DisplayClass59_0. b__0 () (at <1ada6c7052bb42378c5ec1bd01fc4723>:0) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
Ok that is useful information. It seems to be related to the Reorderable lists. Hopefully it's something that I can fix and not something internal to reorderable lists. Maybe there is a validation step I can add if somehow the it gets into an invalid state and then fix it.
If you duplicate an animation module with this issue, does the duplicate exhibit the same behavior?
Duplicate modules do exhibit the same behavior, though that might be a red herring as newly created modules / pre-processors also exhibit it.
I'm still messing around with smaller projects trying to replicate the issue, but it's certainly an odd one.
When attempting to delete a composite list in the pre-processor the last list get's deleted rather than the one selected.