public static void RenderRectProperty(VisualElement container, string name, object value, Action <object> setter) { var field = new RectField(name); field.SetValueWithoutNotify((Rect)value); field.MarkDirtyRepaint(); field.RegisterValueChangedCallback(evt => setter(evt.newValue)); container.Add(field); }
public void Update(InspectorDataProxy <Rect> proxy) { var c = proxy.Data; m_Field.SetValueWithoutNotify(new UnityEngine.Rect(c.x, c.y, c.width, c.height)); }