[Unity]FBX默认导入设置修改器
2020/03
30
21:03
using UnityEditor;
public class EditorFbxImportSetting : AssetPostprocessor
{
void OnPreprocessModel()
{
ModelImporter importer = assetImporter as ModelImporter;
if (importer == null)
{
return;
}
string name = importer.assetPath.ToLower();
string extension = name.Substring(name.LastIndexOf(".")).ToLower();
switch (extension)
{
case ".3ds":
case ".fbx":
case ".blend":
importer.importMaterials = false;
importer.importCameras = false;
importer.importLights = false;
importer.generateSecondaryUV = false;
importer.swapUVChannels = false;
importer.optimizeMesh = true;
break;
default:
break;
}
}
}
这样美术在导入FBX时,就不用一个个勾掉Material设置了
CopyRights: The Post by BY-NC-SA For Authorization,Original If Not Noted,Reprint Please Indicate From 老刘@开发笔记
Post Link: [Unity]FBX默认导入设置修改器
Post Link: [Unity]FBX默认导入设置修改器