question

weloyus avatar image
weloyus asked

How can I know the correct field for parsing return value from cloud script properly in unreal engine 5 with blueprint?,

Hi, I'm new to playfab. In unity, it is easy to parse return value without specified field name, however, in unreal engine I don't know how to checkout correct field name for return value from cloud script.

Here is an example:

I wrote a simple function "hellFuc" in playfab cloud script like below:

My target is to return "Hello" string from cloud script inside unreal engine.

Here is the blueprint I refer to official document:

"Execute cloud script" node works fine, and callback "Function Result" can return some json info. However, I don't know what "field name" should I input to parse json back to "Hello" string properly.

If you have any advice, please let me know it.

Thank you.

,

unreal
cloudscript.jpg (112.8 KiB)
question.png (320.1 KiB)
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Gosen Gao avatar image
Gosen Gao answered

We recommend returning the result like:

handlers.CTsReturnString = function ()
{
    return {Message:"Hello"};
};

Then you can access the ‘Message’ field with BP below.


3ighq.png (70.8 KiB)
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

weloyus avatar image weloyus commented ·

Thank you. It really helps me a lot. :)

Few detailed tutorials for blueprint in unreal engine.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.