How to keep UPROPERTIES changed through C++ in a Level Actor Instance Persistent between Editor Sessions?

I don’t know the proper solution on this, but i solved it via Editor Utility Widget where on button click i’m:

Not 100% automated, but this solves the problem for me for now.

I did try to do it “properly”, but there was so much problems that it isn’t worth further research for me.
fyi the problems to consider:

  • guids regenerating each time object is moved;
  • guids not regenerating on actor duplication (like alt+move);
  • guids regenerating on each blueprint compilation.

upd: a year later:
Turns out there is an UObject::PostEditImport() function that got called whenever you need: on placing\dropping actor into the level, on duplication, on copy-pasting… so it seems it’s a way to solve the original problem