question

Kim Strasser avatar image
Kim Strasser asked

What is the difference between objects and files in the player's account?

For what purposes can I use Objects and Files in the player's account?

What is the difference between Files and Content-->File Management?

What is the difference between Objects and Files? What exactly is an object?

Can player_A upload an image or text file in his Title player account-->Files and after that player_B downloads the file in my game?

Account Management
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

·
Citrus Yan avatar image
Citrus Yan answered

>> For what purposes can I use Objects and Files in the player's account?

The concepts of Objects and Files you talked about are introduced by the new Entity Programming Model PlayFab offers. Please navigate to the link to learn about more.

In short, Objects (Entity objects) allow you to read and write small JSON-serializable objects attached to an entity, and Files (Entity files) allow you to read and write files attached to an entity, in any format. It’s helpful for you to follow through this Entities quickstart to better understand these concepts.

>> What is the difference between Files and Content-->File Management?

Files in this case refers to the files attached to an entity while “Content-->File Management” refers to the PlayFab Content Delivery Network (CDN), which stores individual assets as files uniquely identified by the file name (also referred to as a key), please navigate to the link to learn about more.

>>What is the difference between Objects and Files? What exactly is an object?

Like I mentioned above, Objects (Entity objects) allow you to read and write small JSON-serializable objects attached to an entity, and Files (Entity files) allow you to read and write files attached to an entity, in any format. Therefore, Object is a JSON-serializable object attached to an entity.

>> Can player_A upload an image or text file in his Title player account-->Files and after that player_B downloads the file in my game?

No, in normal circumstances, only the owner of player’s entity, in this case, player A, or higher level entity such as title entity, can download the file.

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.

Kim Strasser avatar image Kim Strasser commented ·

I want to write and read a small JSON-serializable object. But I get this message when I use PlayFabDataAPI.SetObjects and I don't know if I should use 'PlayFab.AdminModels.EntityKey' or 'PlayFab.ClientModels.EntityKey'.

'EntityKey' is an ambiguous reference between 'PlayFab.AdminModels.EntityKey' and 'PlayFab.ClientModels.EntityKey'<br>

Should I always use PlayFab.ClientModels.EntityKey in the client code?

In addition, I get this error message:

Error CS0029: Cannot implicitly convert type 'PlayFab.ClientModels.EntityKey' to 'PlayFab.DataModels.EntityKey'
var result = await PlayFabDataAPI.SetObjectsAsync(new PlayFab.DataModels.SetObjectsRequest()
{
    Entity = new PlayFab.ClientModels.EntityKey { Id = EntityID, Type = EntityType },
    Objects = dataList
});

I get EntityID and EntityType when the player calls LoginWithIOSDeviceID:

EntityID = task.Result.Result.EntityToken.Entity.Id;
EntityType = task.Result.Result.EntityToken.Entity.Type;

What am I doing wrong?

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.