private static void ReapAnimator(AnimatorController animatorController) { if (AssetDatabase.GetAssetPath(animatorController) == "") { return; } var allSubAssets = AssetDatabase.LoadAllAssetsAtPath(AssetDatabase.GetAssetPath(animatorController)); var reachableMotions = SharedLayerUtils.FindAllReachableClipsAndBlendTrees(animatorController) .ToList <Object>(); Reap(allSubAssets, typeof(BlendTree), reachableMotions, o => o.name.StartsWith("autoBT_")); }
private List <string> FindPotentiallyAnimatedPaths() { return(SharedLayerUtils.FindAllReachableClipsAndBlendTrees(_fxController) .OfType <AnimationClip>() .SelectMany(clip => { var materialSwaps = AnimationUtility.GetObjectReferenceCurveBindings(clip); var transforms = AnimationUtility.GetCurveBindings(clip) .Where(binding => binding.type == typeof(Transform)); return transforms.Concat(materialSwaps) .Select(binding => binding.path); }) .Distinct() .ToList()); }