AssetPostprocessor.OnPreprocessModelfunction OnPreprocessModel () : voidDescriptionAdd 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 MyMeshPostprocessor extends AssetPostprocessor {
function OnPreprocessModel () { // Disable generation of materials if the file contains // the @ sign marking it as an animation. if (assetPath.Contains("@")) { var modelImporter : ModelImporter = assetImporter; modelImporter.generateMaterials = 0; } } } |
