using System.Collections;
using System.Collections.Generic;
using UnityEditor;
public class SetModelAnimationType2Legacy : AssetPostprocessor//需要继承这个
{
void OnPreprocessModel()
{
if (assetPath.Contains("@"))//如果名字包含@
{
ModelImporter model = assetImporter as ModelImporter;
model.animationType = ModelImporterAnimationType.Legacy;
}
}
}
将脚本放到Editor文件夹下,没有自己新建一个,不一定要在根目录,导入资源时,会自动修改名字里带@的模型的动画类型