question

Canberk Soner avatar image
Canberk Soner asked

Delete an entity object

Hello,

I feel like I'm missing something simple. How do I delete an entity object of a title player account using server api (cloudscript)?

Let's say I want to delete "MyOtherObject" in the following screenshot, how do I do that on cloudscript? Or how do I just tell it to delete all its objects?

I tried calling

        entity.SetObjects
        ({
            Entity : { Id : titlePlayerId, Type : "title_player_account"},
            Objects :
            [
                { ObjectName : "MyOtherObject", DataObject : null }
            ]
        });

but it did not work.

entities
capture.jpg (38.3 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

·
Canberk Soner avatar image
Canberk Soner answered

It was something simple indeed. Leaving the answer here just in case:

DeleteObject : true

from https://api.playfab.com/documentation/Data/datatype/PlayFab.Data.Models/PlayFab.Data.Models.SetObject

10 |1200

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

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.