Version: 2023.2
언어: 한국어

설명

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.materialImportMode = ModelImporterMaterialImportMode.None; } } } }