question

Mubarak Almehairbi avatar image
Mubarak Almehairbi asked

Two entities can have the same ID?

Hi, in this tutorial about entity groups: https://learn.microsoft.com/en-us/gaming/playfab/features/social/groups/quickstart#using-entity-groups, I find this comment in the sample code:

// This cache pretty much only serves this example , and assumes that entities are uniquely identifiable by EntityId alone, which isn't technically true. Your data cache will have to be better.

You can find this comment in the beginning of the GuildTestController class.

Does the comment mean that two entities can have the same ID? If not, then what does it mean?

Also, is the ID the only way to separate a "Guild" from a "Party" or a "Clan"?

entities
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

·
Neils Shi avatar image
Neils Shi answered

As Entity Programming Model - PlayFab | Microsoft Learn mentions: “Entities are the most basic addressable "things" that PlayFab APIs operate on. Each entity has a Type and an Id that together uniquely identify it.” That's why the comment says that an entity may not be uniquely identified with only Entity ID. In fact, it is not possible to have two same entity group IDs under the one title. But if you're working with multiple titles and with different types of entities (players, characters, groups, etc.), you may not be able to uniquely identify an entity using only the Entity ID. In addition, what do you mean “is the ID the only way to separate a "Guild" from a "Party" or a Clan"? The entity groups are any logical group of entities, which can serve any purpose, the “Guild”, “Party" and "Clan" are all essentially functions implemented by entity groups.

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.

Mubarak Almehairbi avatar image Mubarak Almehairbi commented ·

Thanks, maybe this is a separate question, but I meant how do I label an entity as "Party" or "Guild" or "Clan" or something else. I will send it as a separate question.

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.