Descripción

Add this function to a subclass to get a notification just before any Asset is imported.

This lets you control the import settings through code.

using UnityEditor;

class MyModelPostprocessor : AssetPostprocessor { void OnPreprocessAsset() { if (assetImporter.importSettingsMissing) { ModelImporter modelImporter = assetImporter as ModelImporter; if (modelImporter != null) { if (!assetPath.Contains("@")) modelImporter.importAnimation = false; modelImporter.importMaterials = false; } } } }