//assetPath: 资源文件相对于项目文件夹路径 //clipAnimations:自定义的动画剪辑 ModelImporter modelImporter=(ModelImporter)AssetImporter.GetAtPath(assetPath); modelImporter.clipAnimations=clipAnimations; EditorUtility.SetDirty(modelImporter); modelImporter.SaveAndReimport();