public static void FillModelImportDataSettings(UnityEditor.ModelImporter modelImporter, ModelImportData mid) { var animations = modelImporter.defaultClipAnimations; for (var index = 0; index < animations.Length; index++) { if (mid.ContainsAnimation(animations[index].name)) { continue; } mid.AddAnimationData(animations[index].name, false, false); } EditorUtility.SetDirty(mid); }
public static bool CheckModeImportDataForFull(ModelImportData mid, UnityEditor.ModelImporter modelImporter) { var counter = 0; var animations = modelImporter.defaultClipAnimations; for (var index = 0; index < animations.Length; index++) { if (mid.ContainsAnimation(animations[index].name)) { counter++; } } return(counter == animations.Length); }