I add a component to an Actor on scene through the function (shown below). Idea works, but there is an unpleasant nuance that I want to solve.
When I click button that will create/register/attach a component to an Actor, everything works, except that the component DOES NOT DISPLAY in that Actor Details panel. As soon I deselect this object and select it again, the component is correctly displayed where it should be.
How to change this behavior? After all, if I simply add a component via "+ Add ", then Details panel displays everything at once. Do I need to look for some “data update” function in some Slate-class or is there an easier way?
Now I will click on highlighted button (Add Cutter) to add a comp.
you may need to # include “ViewportClient.h” for FViewportClient
Selection->Deselect(this) - in my case, I deselect the object in which this logic is written, but you need a pointer to the object from which you deselect
if anything, then this is also possible: Selection->Select(pointer to UObject), if you need it
main method here - RedrawRequested(), if your goal is the same task that I had when created this post