Unity代码修改模型动画属性
ModelImporter modelImporter = AssetImporter.GetAtPath(assetPath) as ModelImporter; ModelImporterClipAnimation tempClip = modelImporter.defaultClipAnimations[0]; tempClip.name = GetName(name); tempClip.keepOriginalOrientation = true; tempClip.lockRootRotation = true; tempClip.keepOriginalPositionY = true; tempClip.lockRootHeightY = true; tempClip.lockRootPositionXZ = true; tempClip.keepOriginalPositionXZ = true; tempClip.loopTime = true; modelImporter.clipAnimations = new[] { tempClip }; |