Custom Material Editor

Hello everyone,

I am trying to build a custom material editor find I found an issue on the gui.

material

private void ShaderProperty(string name)
{
    MaterialProperty property = GetMaterialProperty(targets, name);
    ShaderProperty(property, property.displayName);
}
 
public override void OnInspectorGUI()
{
    ShaderProperty("_Color");
}

Is there a way to avoid that ?
Thanks a lot.

I found out how to do it. Just ust EditorGUIUtility.

EditorGUIUtility.fieldWidth = 64.0f;