zoukankan      html  css  js  c++  java
  • FbxImportUniform

    using UnityEditor;
     
    /// <summary>
    /// 设置导入到Characters文件夹中Models文件夹下模型的属性
    ///
    /// 把本脚本拷贝到Editor文件夹下,自动执行
    ///
    /// </summary>
     
    public class FbxImportUniform : AssetPostprocessor {
     
     public void OnPreprocessModel()
     {
     
      ModelImporter modelImporter = (ModelImporter) assetImporter;
     
      string Fbx_Path = AssetDatabase.GetAssetPath (modelImporter);
     
      if ( Fbx_Path.Contains ("Art/Characters") && Fbx_Path.Contains ("Models") )
      {
       
       modelImporter.globalScale = 1;                                             //Scale Factor      1
       modelImporter.normalImportMode = ModelImporterTangentSpaceMode.Calculate;  //Mormals           Calculate
       modelImporter.tangentImportMode = ModelImporterTangentSpaceMode.None;      //Tangents          None
       modelImporter.normalSmoothingAngle = 180f;                                 //Smoothing Angle   180
       modelImporter.importMaterials = false;                                     //Import Material   cancel
       
       modelImporter.animationType = ModelImporterAnimationType.Legacy;           //Animation Type    Legacy
       
       modelImporter.importAnimation = false;                                     //Import Animation  cancel  
     
      }  
     }  
    }
  • 相关阅读:
    二叉平衡树
    红黑树
    [leetcode] LCP 比赛
    二叉搜索树
    面向对象的二叉树的实现
    二叉树的序列化与反序列化
    [leetcode] 基本计算器
    【pandas】玩转一行拆多行,多行并一行(分分合合你说了算)
    【VBA】数据溢出与解决
    【VBA】criterial 未找到命名参数
  • 原文地址:https://www.cnblogs.com/JimmyCode/p/4561660.html
Copyright © 2011-2022 走看看