thibaud-d
6/30/2014 - 6:14 AM

Asset post-processor for blend files.

Asset post-processor for blend files.

/** 
 * put this class in a folder named 'editor' 
 * (somewhere in Assets folder)
 */
class ImportSettings extends AssetPostprocessor {
	
  function OnPreprocessModel() {
    
     var importer:ModelImporter = assetImporter as ModelImporter;
     var name = importer.assetPath.ToLower();
     if(!name.EndsWith(".blend"))return;
      
     importer.addCollider = true;
		
     importer.animationType =
	  ModelImporterAnimationType.Legacy;
		
     importer.generateAnimations =
	  ModelImporterGenerateAnimations.None;

     importer.generateSecondaryUV = true;
	
     importer.secondaryUVHardAngle = 20;
		
  }
	
}