question

mak avatar image
mak asked

How do i retrieve Objects of group ?

I see there is options of Objects where we can store small json data of 3 objects. i want retrieve and edit them using code. i dont find any way from docs and also from forum so plz help me if there any way to access that. Thanks

screenshot-1.png (41.4 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

·
brendan avatar image
brendan answered

Groups are a type of Entity - that's the newer model we've introduced for managing players, characters, groups, etc., and their associated data, in PlayFab. The first tutorial - "Getting Started with Entities" - in the Entities section of the docs walks you through how to use Entity Objects and Files.

https://api.playfab.com/docs/tutorials/#entities

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.

mak avatar image mak commented ·

I m not getting your point clearly. just i wanto know that there is anyway of getting data which stored in objects list of groups

0 Likes 0 ·
JayZuo avatar image JayZuo ♦ mak commented ·

As @Brendan said, Groups are a type of Entity. All Entity types support the same GetObjects and SetObjects methods. You can follow the Entity Objects section in Getting Started with Entities and for group, the Id used in EntityKey would be your group's ID and the Type would be "group". Using Unity for example:

PlayFabDataAPI.GetObjects(new PlayFab.DataModels.GetObjectsRequest { Entity = new PlayFab.DataModels.EntityKey { Id = "your Group ID", Type = "group" } },
    (result) =>
    {
        JsonObject jsonData = (JsonObject)(result.Objects["test"].DataObject);
        Debug.Log(jsonData);
    },
    (error) => { Debug.LogError(error.GenerateErrorReport()); });
0 Likes 0 ·
mak avatar image mak commented ·

Sorry for understanding let. i get all from your answer. ignore older comments. very thanks @Brendan

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.