public static void RenderIntProperty( VisualElement container, string name, object value, Action <object> setter) { var field = new IntegerField(name); field.SetValueWithoutNotify((int)value); field.MarkDirtyRepaint(); field.RegisterValueChangedCallback(evt => setter(evt.newValue)); container.Add(field); }