When adding Style class or directly changing values in the UI Builder Inspector. How would you get the current value of that visual element in the event?
[UxmlElement]
public partial class CustomSlider : VisualElement
{
public CustomSlider() : this(null) { }
public CustomSlider(object n)
{
RegisterCallback<PointerUpEvent>(ReleaseSlider);
}
void ReleaseSlider(PointerUpEvent evt)
{
Debug.Log(this.style.flexDirection.value);
SliderSelected = false;
this.ReleasePointer(evt.pointerId);
evt.StopPropagation();
MouseUp?.Invoke(value);
}
}