public static void ExportPreset(MenuCommand command)
{
string exportPath = EditorUtility.SaveFolderPanel("Set preset export path...", "", "");
if (exportPath != "")
{
ProceduralMaterial context = command.context as ProceduralMaterial;
SubstanceImporter atPath = AssetImporter.GetAtPath(AssetDatabase.GetAssetPath(context)) as SubstanceImporter;
if (atPath != null)
{
atPath.ExportPreset(context, exportPath);
}
}
}