get custom entities associated to a player at login.
-
Hi,
a player custom entity is not returned event when
"Return User Entities during Authenticate and ReadPlayerState methods" is enabled in app settingsthe methods ReadEntity in custom entity api require and entityId.
how do we read a player custom data (custom entities) ? at login for example ?
thank -
Hi,
a player custom entity is not returned event when
"Return User Entities during Authenticate and ReadPlayerState methods" is enabled in app settingsthe methods ReadEntity in custom entity api require and entityId.
how do we read a player custom data (custom entities) ? at login for example ?
thankok, when defining a custon entity you create a field owner , that you set as an index later in the dasboard.
{ "owner": "", "id": "", "code": "", "gunType": "basic", "ammo": 10, "lifes": 3 }when creating a custon entity , you set the field owner with th current player profileId
then you can retrieve it with a call to GetEntityPage{ "entityType": "playerData", "context": { "pagination": { "rowsPerPage": 50, "pageNumber": 1 }, "searchCriteria": { "data.owner": "[current player profileId]" }, "sortCriteria": { "createdAt": 1 } } } -
Edit . you can get all custom entities for the current user with the query
{ "entityType": "[entitytype]", "ownerId": "[profileId]", "context": { "pagination": { "rowsPerPage": 50, "pageNumber": 1 }, "searchCriteria": { // other search criteria here }, "sortCriteria": { "createdAt": 1 } } }
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login