public static bool edit(this Material mat, FloatValue property, string name, float min, float max) { var val = mat.Get(property); if (name.IsNullOrEmpty()) { name = property.NameForDisplayPEGI(); } if (name.edit(name.Length * pegi.letterSizeInPixels, ref val, min, max)) { mat.Set(property, val); return(true); } return(false); }