如下图示属性,需要批量通过代码修改
![](https://imgconvert.csdnimg.cn/aHR0cDovL2ljZWxpbHkueHl6L3dwLWNvbnRlbnQvdXBsb2Fkcy8yMDE5LzEwL1FRJUU2JTg4JUFBJUU1JTlCJUJFMjAxOTEwMzExMDU2MDEuanBn?x-oss-process=image/format,png)
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 }; |
属性对应可见http://icelily.xyz/wordpress/?p=739