Version: 2022.3
言語: 日本語

説明

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

これによりインポート設定をコードにより制御できます。

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; } } } }