Hi,
I dont want Unity to import the materials from fbx models, so I created an input override class:
using UnityEditor;
public class ModelImportOverride : AssetPostprocessor
{
void OnPreprocessModel()
{
ModelImporter importer = assetImporter as ModelImporter;
string name = importer.assetPath.ToLower();
if (name.Substring(name.Length - 4, 4) == ".fbx")
{
importer.importMaterials = false;
importer.globalScale = 1;
importer.animationType = ModelImporterAnimationType.Legacy;
}
}
}
The materials arent imported, but the fbm folder is still created (empty). How can I fix this?
I already tried this:
void OnPostProcessModel()
{
ModelImporter importer = assetImporter as ModelImporter;
Directory.Delete(importer.assetPath.Substring(0, importer.assetPath.Length - 4) + ".fbm");
}
but that didnt work either.