Created
June 23, 2017 17:16
-
-
Save phosphoer/0748d99259c4ad7c51f9ec510dc0edd0 to your computer and use it in GitHub Desktop.
Unity Disable Material Import
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#if UNITY_EDITOR | |
using UnityEditor; | |
public class DisableMaterialImport : AssetPostprocessor | |
{ | |
public void OnPreprocessModel() | |
{ | |
ModelImporter modelImporter = (ModelImporter)base.assetImporter; | |
if (modelImporter != null) | |
{ | |
modelImporter.importMaterials = false; | |
} | |
} | |
} | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment