Hi,
In the blueprint, there is a JSON utility plugin that we can use to deal with JSON objects. I found that the GetField node will output a wildcard variable. If I store the information of the actor in the JSON object, the GetField can give the actor back to me. How can I achieve this in C++?
Here is what it looks like in the blueprint:
For these two nodes, the SetField will get the actor-specific identifier path and store it in the value field. Then when GetField I can just use this actor and get the property or set the stuff of the actor.
Here is the key value in the JSON:
{"Actor":"/Game/MyEnhancedInputActor.MyEnhancedInputActor_C'/Game/ThirdPerson/Maps/UEDPIE_0_ThirdPersonMap.ThirdPersonMap:PersistentLevel.MyEnhancedInputActor_C_UAID_08BFB8A383C893C201_1726865895'"}
So in C++, how can I call this function? there is a int32& Value. How can I pass value in it?
Here is what I try to do:
This will have an error which is the AActor* cannot convert to int32&.
I do not know if I call this customThunk function in this way, will it work the same as in the blueprint? if not, how can I do this?
Like I have one thought:
I wrap this into a function and if it wants a field with an actor, then I will get the string in the actor, but how can I make it to the actor with this string path?
Thanks for your reply.