By default, Function(Property) will be called lots of times using UE4 slider to tweak Property. However, Function() in our case is quite expensive, so we want to avoid calling it several times. Instead, we would like to avoid calling Function(Property) until the slider is released.
Is there a flag for UPROPERTY to do this? Or any other solutions?
I was thinking maybe there is an option in UPROPERTY flags/meta data that can be used to indicate this kind of usage. But it turned out there is no such flag. As for OnMouseCaptureEnd, I donβt see any function calls regarding to it in my case.
It would be better to first create/spawn the USlider widget from your c++ class with MySlider = CreateWidget<USlider>(MyPlayerController, ParentWidget); and then simply use the solution in 1 USlider->OnMouseCaptureEnd.AddDynamic(this, &MyListenerClass::OnMouseCaptureEndHandler); https://docs.unrealengine.com/latest/INT/API/Runtime/UMG/Blueprint/CreateWidget/1/
If you want total control over this slider you can inherit it.
Look at the class USlider | Unreal Engine Documentation
And you can then just expose the event to blueprint and do even more