private static void ExportBitmaps(ProceduralMaterial material, bool alphaRemap)
{
string exportPath = EditorUtility.SaveFolderPanel("Set bitmap export path...", "", "");
if (exportPath != "")
{
SubstanceImporter atPath = AssetImporter.GetAtPath(AssetDatabase.GetAssetPath(material)) as SubstanceImporter;
if (atPath != null)
{
atPath.ExportBitmaps(material, exportPath, alphaRemap);
}
}
}