首页 > 其他分享 >unity editor 读取FBX下的animtion clip文件

unity editor 读取FBX下的animtion clip文件

时间:2022-10-21 17:22:23浏览次数:57  
标签:读取 clip assetFullNameRegex FBX unity ModelImporter modelImporter

使用ModelImporter可以读取FBX下数据:

 1    ModelImporter modelImporter = (ModelImporter)AssetImporter.GetAtPath(modelAssetPath);
 2                                 if (modelImporter && modelImporter.clipAnimations.Length > 0)
 3                                 {
 4                                     //可能有animClip在fbx文件下面,表明是anim的规则判断
 5                                     regexString = string.Format(ctrInfo.animation_regex, assetFullNameRegex);
 6                                     fileType = "anim";
 7                                 }
 8                                 else
 9                                 {
10                                     regexString = string.Format(ctrInfo.model_regex, assetFullNameRegex);
11                                     fileType = "model";
12                                 }

 

标签:读取,clip,assetFullNameRegex,FBX,unity,ModelImporter,modelImporter
From: https://www.cnblogs.com/sun-shadow/p/16814178.html

相关文章