question

dylan-1 avatar image
dylan-1 asked

[Unreal] How to add arbitrary objects to CreateGroup?

I want to add an "Object" to the objects tab in a Group in the playfab portal via ue4 cpp code.

I tried this:

Compiles fine, but doesn't seem to actually pass anything. I can't seem to find documentation/examples for this, either.

Would love some explanation/example/doc links on how to use UPlayFabJsonObjects (and ConstructJsonObject from a model class)! Thanks~

sdksunreal
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.

Gosen Gao avatar image Gosen Gao commented ·

I will do some research.

0 Likes 0 ·

1 Answer

·
Gosen Gao avatar image
Gosen Gao answered

The CustomTags is not used for such situations, it is a parameter which works with PlayStream. For your case, to create an Object for a Group, you need to create a group first. Then you can use API Object - Set Objects - REST API (PlayFab Data) | Microsoft Learn to add Objects for this group.

Also, the UPlayFabJsonObjects (and ConstructJsonObject from a model class) you are using is under the UnrealMarketplacePlugin/4.27/PlayFabPlugin/PlayFab/Source/PlayFab at master PlayFab/UnrealMarketplacePlugin GitHub folder and it is for blueprint. We have the UnrealMarketplacePlugin/4.27/PlayFabPlugin/PlayFab/Source/PlayFabCpp at master PlayFab/UnrealMarketplacePlugin GitHub folder for CPP projects. Since you are implementing a CPP project, as we mention here, “Open the YourProject.Build.cs file and update the PublicDependencyModuleNames with "PlayFab" (for the Blueprints module) and "PlayFabCpp" (for the C++ module)”, please follow the documentation to use the headers under PlayFabCpp.

3 comments
10 |1200

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

dylan-1 avatar image dylan-1 commented ·

> or your case, to create an Object for a Group, you need to create a group first. Then you can use API Object - Set Objects - REST API (PlayFab Data) | Microsoft Learn to add Objects for this group.

Answer is likely this - thanks!

We added both "PlayFab" and "PlayFabCpp" - that's ok, right? Eg: I work on cpp, but sometimes frontend wants some blueprints.

0 Likes 0 ·
dylan-1 avatar image dylan-1 commented ·

I'm having trouble finding the entry point to the Object API in Unreal - where can I find this?

0 Likes 0 ·
dylan-1 avatar image dylan-1 dylan-1 commented ·

Got it - a different API (GetDataAPI). However, I'm not quite sure how to tie it to groups, specifically. I include that group as the entity (rather than my player, usually the default entity)?

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.