internal override void OnHeaderTitleGUI(Rect titleRect, string header)
{
ProceduralMaterial target = base.target as ProceduralMaterial;
m_Importer = AssetImporter.GetAtPath(AssetDatabase.GetAssetPath(base.target)) as SubstanceImporter;
if (m_Importer != null)
{
string name = target.name;
name = EditorGUI.DelayedTextField(titleRect, name, EditorStyles.textField);
if (name != target.name)
{
if (m_Importer.RenameMaterial(target, name))
{
AssetDatabase.ImportAsset(m_Importer.assetPath, ImportAssetOptions.ForceUncompressedImport);
GUIUtility.ExitGUI();
}
else
{
name = target.name;
}
}
}
}