Skip to content

Instantly share code, notes, and snippets.

@andyman
Created January 20, 2017 22:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andyman/d70315460f11d348d490c46c1b62cab8 to your computer and use it in GitHub Desktop.
Save andyman/d70315460f11d348d490c46c1b62cab8 to your computer and use it in GitHub Desktop.
Add this to your /Editor folder in Unity to avoid importing materials for meshes.
using UnityEditor;
public class DontImportMaterials : AssetPostprocessor
{
public void OnPreprocessModel()
{
ModelImporter modelImporter = (ModelImporter) assetImporter;
modelImporter.importMaterials = false;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment