How to update a customized details panel?
I have a custom property layout which should (in theory) display a variable number of children based on this property's value. An adjustable length array, so to speak. So, my CustomizeChildren generates an appropriate number of elements, but I have to push Recompile to update the details panel after changing this value. I can call any function when it changes using IPropertyHandle::SetOnPropertyValueChanged. So, which function is used to refresh the details view?
I've tried NotifyPostChange and some other stuff but none of it works. I am sure this is possible - after all, TArray does work. But I can't find its customization code, which would make my life easier. I haven't tried to make full class details customizations yet, but I will if it's necessary.
As a side question, where does the "reset to default" button come from? I want to either disable it, or make it reset to my values rather than being completely empty.
Nicely generated at first Changed ItemClass to new value After pressing Compile
after almost 3 years from the original question - but there is a solution. Get the parent category, and then the parent layout. Then just refresh.
IDetailCategoryBuilder &ParentCategory = StructBuilder.GetParentCategory(); IDetailLayoutBuilder &LayoutBuilder = ParentCategory.GetParentLayout(); LayoutBuilder.ForceRefreshDetails();
answered Mar 09 '18 at 08:58 AM
Old question, but I was needing the same thing and found this to work when needing a total refresh of the Details Panel...
answered Aug 14 '17 at 05:55 PM
I don't think you can do this with an
You'll get a reference to an
As for the reset to default, that has a very specific meaning which you shouldn't try to change - it resets the property to the value specified in the class default object of the given instance's class (or for a blueprint, to the value from the parent class). So if its behaviour isn't what you expect, you should probably be putting the default values you want inside the C++ class constructor.
Follow this question
Once you sign in you will be able to subscribe for any updates here