Gizmos only updating while hovering over scene or game view

I have a method in my editor script:

[DrawGizmo(GizmoType.Selected | GizmoType.Active)]
static void DrawGizmos(Orbit orbit, GizmoType gizmoType)

But it doesn’t get called when I change a variable in the inspector, until I move my mouse over the game view and wait a second.

Is there an efficient way to make sure the method is called every time a variable is changed?

Thank you.

It’s most likely the “GizmoType.Selected” portion, as it only draws it if it’s selected.

I would recommend using:

    void OnDrawGizmos()
        //Gizmo stuff in here.