I know, old question but I was just looking for this, having forgotten that I did do it in one of my old projects before. So I’ll post a solution in case someone else happens on this.
This assumes you want to force a repaint on a custom inspector.
public static void RepaintInspector(System.Type t)
{
Editor[] ed = (Editor[])Resources.FindObjectsOfTypeAll<Editor>();
for (int i = 0; i < ed.Length; i++)
{
if (ed.GetType() == t)
{
ed.Repaint();
return;
}
}
}
and to use
RepaintInspector( typeof(SomeTypeInspector) );
where
[CustomEditor(typeof(SomeType))]
public class SomeTypeInspector: Editor
{
//...
}