I’m having some issues with a custom EdModeToolkit Slate editor plugin, each time I interact with the UI the viewport does not update immediately. The OnValueChanged callback is connected to a method that deforms the selected mesh.
- SAssignNew(Slider, SSpinBox<float>)
- .OnValueChanged(this, &FCustomEdModeToolkit::SpinTestHandler)
The interaction seems slow and laggy. When I put the same method in the OnConstruction construction script override of the actor it self it does update right away without any lags. (Changing UPROPERTY directly on the actor)
I have tried the following:
- Change the ‘PreventThrotteling’ setting in the Spinbox to make sure that the viewport refreshes on each value change.
- Force refresh the viewport using FEditorViewportClient and Invalidating the current viewport. Similar issue: How to refresh Viewport when dragging a spinbox (FModeToolkit)? - UE4 AnswerHub
- Tried to change the selection state in the viewport by selecting the same actor again to trick the focus of viewport.
- Tried to call GetEditorMode()->ReceivedFocus() to focus on the current viewport client
Issue also occurs in 4.22.