Hello everyone, after some time, I finally returned to one problem.
After compiling a blueprint (actor), I need to change the value of some variables. And it works, but with one exception:
If there are already actors of this class on the level, then the variable in them will not change.
But if I manually change the value in blueprint (in details panel), then the actors on the level change too.
New actors are created at the level with the current value, but also do not react to the change.
In my journey through the source code I came to the conclusion that I need to use FPropertyNode, it is in it (if I understood correctly) that the delegate responsible for updating is called. But it is a private class, and I cannot create it in my code (or am I missing something?). It in turn is maked from IPropertyHandle, but the child classes are also private.
But I found that ISinglePropertyView has a GetPropertyHandle() function, and if you call SetValue() in it, that’s exactly what happens when the value is edited manually.
Well, this (as it turns out) only works for single variables, but doesn’t work (why?) for Map (and apparently for other containers too)
Although I can get IPropertyHandleMap from IPropertyHandle, but it only has AddItem function which adds empty value and it even appears in actors in the level.
But if I call IPropertyHandle->SetValueFromFormattedString it doesn’t work as for single variables.
The variable is only changed in the blueprint, but for actors in the level it needs to be reset to the default value manually.
Until I find the right solution (it obviously exists, because when changing manually everything works as it should), I settled on the option where I change the buffer variable FString, the change of which works in the actors at the level, and then I take the value from it and apply it to the map variable: