function OnPreprocessModel () : void
Description
Add this function in a subclass to get a notification just before a model (.fbx, .mb file etc.) is being imported.
This lets you control the import settings trough code.
class DisableMaterialGeneration
extends AssetPostprocessor {
function OnPreprocessModel () {
if (assetPath.Contains(
"@")) {
var modelImporter :
ModelImporter = assetImporter;
modelImporter.generateMaterials = 0;
}
}
}