Modifying the value of an FString in an array with reflection.
I'm using reflection to get a uproperty which is an array of strings using:
This doesn't appear to modify the original array, however. What I'm trying to figure out, is how to change the value at index to the value of the string NewValue
I've seen lots of posts about using ContainerPtrToValuePtr, and I've been able to return a modified array as a & parameter, but I can't figure out how to modify the original array property. I'm trying to create a generic string array editor.
I was greatly helped by this: http://shootertutorial.com/2016/03/20/get-set-variables-by-name/
And ultimately, I'm trying to create a new SetStringArrayElementByName UFUNCTION to take an index, target, a uproperty name, and a string value, and make the change.
You should try without dereferencing the pointer to the array into a variable ( it make a copy of it )
not 100% sure, but that's how i would do it !
answered Sep 21 '18 at 12:39 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here