private void DrawDetail(List <LostProperty> Props)
        {
            using (new GUILayout.VerticalScope())
            {
                foreach (var prop in Props)
                {
                    var icon = prop.State == FixState.Fixed ? SuccessIcon : ErrorIcon;
                    DrawSpaceAndText(DetailSpace, prop.PropPath + " : " + prop.AttributeName, icon, prop.State);

                    if (prop.State == FixState.ErrorDuplicate)
                    {
                        foreach (var path in prop.FindPropPaths)
                        {
                            DrawButtonAndText("Select", path, () =>
                            {
                                AnimationValidator.UpdateAnimationRelativePath(prop, path);
                            });
                        }

                        EditorGUILayout.Space();
                    }
                    else if (prop.State == FixState.ErrorNoSameName)
                    {
                        prop.FixedPath = DrawButtonAndEditText("Fix", "->", prop.FixedPath, " : " + prop.AttributeName, () =>
                        {
                            if (AnimationValidator.ExistObjectFromAnimationPath(_selectedObject, prop.FixedPath))
                            {
                                AnimationValidator.UpdateAnimationRelativePath(prop, prop.FixedPath);
                            }
                        });
                        EditorGUILayout.Space();
                    }
                }
            }
        }
 public static void Open()
 {
     _clipValidations = AnimationValidator.ValidateAnimation();
     if (_clipValidations == null)
     {
         return;
     }
     _window = GetWindow <AnimationValidatorView>();
     _window.titleContent = new GUIContent("anim修正");
     _selectedObject      = Selection.activeGameObject;
 }
 private void DrawOnError(ClipValidationContainer result)
 {
     DrawIconAndLabel(ErrorIcon, result.ClipName);
     DrawDetail(result.LostProperties);
     DrawButton("自動修正", () =>
     {
         AnimationValidator.ExecuteUnitRecovery(_selectedObject, result, ShowProgress);
         _window.Repaint();
         EditorApplication.RepaintAnimationWindow();
     });
 }
        private void OnGUI()
        {
            if (_clipValidations == null || _clipValidations.Count == 0)
            {
                GUILayout.Label("AnimationClipがありません");

                return;
            }

            _scrollPos = EditorGUILayout.BeginScrollView(_scrollPos, true, true);
            GUILayout.Label("=====================================");
            GUILayout.Label("Animationでmissingになっているものを表示します");
            GUILayout.Label("オブジェクトの名前が他と被っていなれば自動で修正します");
            GUILayout.Label("=====================================");

            if (_clipValidations.Count > 1)
            {
                foreach (var result in _clipValidations)
                {
                    if (!result.HasNoError)
                    {
                        DrawButton("全部まとめて修正", () =>
                        {
                            AnimationValidator.ExecuteAllRecovery(_selectedObject, _clipValidations, ShowProgress);
                            _window.Repaint();
                            EditorApplication.RepaintAnimationWindow();
                        });
                        break;
                    }
                }
            }

            foreach (var result in _clipValidations)
            {
                DrawResult(result);
            }
            DrawButton("閉じる", () => _window.Close());
            EditorGUILayout.EndScrollView();
        }