public ModelImporterClipAnimation[] clipAnimations ;

Description

动画被拆分成的动画剪辑。另请参阅:ModelImporterClipAnimation

当您初次导入文件时,clipAnimations 将始终为空。 如果您需要在初次导入前填充 clipAnimations,可以使用 AssetPostprocessor 并重写 AssetPostprocessor.OnPreprocessAnimation

using UnityEditor;
using UnityEngine;

public class CreateAnimationClip : AssetPostprocessor { void OnPreprocessAnimation() { var modelImporter = assetImporter as ModelImporter; modelImporter.clipAnimations = modelImporter.defaultClipAnimations; } }