当前位置:   article > 正文

Unity FBX 导入分离Mesh和AnimationClip_unity fbx 分离 mesh

unity fbx 分离 mesh

/// 导入fbx时直接分解出AnimationClip /

  1. public static void OnPostprocessAllAssets(string[] importedAsset, string[] deletedAssets, string[] movedAssets, string[] movedFromAssetPaths) {
  2. bool processed_flag = false;
  3. foreach (string asset_path in importedAsset) {
  4. string dir = Path.GetDirectoryName(asset_path);
  5. Object main_asset = AssetDatabase.LoadMainAssetAtPath(asset_path);
  6. if (main_asset.GetType() == typeof(GameObject) && Path.GetExtension(asset_path).ToLower() == ".fbx") {
  7. Object[] assets = AssetDatabase.LoadAllAssetsAtPath(asset_path);
  8. List<Object> animation_clip_list = new List<Object>();
  9. foreach (Object asset in assets)
  10. {
  11. if (asset.GetType() == typeof(AnimationClip))
  12. {
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/article/detail/48326
推荐阅读
相关标签
  

闽ICP备14008679号