Skip to content

Instantly share code, notes, and snippets.

@phosphoer
Created June 23, 2017 17:16
Show Gist options
  • Save phosphoer/0748d99259c4ad7c51f9ec510dc0edd0 to your computer and use it in GitHub Desktop.
Save phosphoer/0748d99259c4ad7c51f9ec510dc0edd0 to your computer and use it in GitHub Desktop.
Unity Disable Material Import
#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