描述

将此函数添加到一个子类中,以在导入模型(.fbx、.mb 文件等)之前获取通知。

借助此函数,您可以通过代码控制导入设置。

    // Disable import of materials if the file contains
// the @ sign marking it as an animation.

class DisableMaterialImport extends AssetPostprocessor { function OnPreprocessModel () { if (assetPath.Contains("@")) { var modelImporter : ModelImporter = assetImporter; modelImporter.importMaterials = false; } } }