Apparently, it can be done in C++. I think I understand what this person is doing except for the ‘header file’ part.
Dynamic Anchor Fields? - Chaos : unrealengine (reddit.com)