question

baneand avatar image
baneand asked

How to set Title objects

Hi guys
I want to set some data in the Title so that all the players can get that data.
I have couple of questions:

1. Can i upload/set title Objects or files from web console?

2. I have logged in as a player > I used GetEntityToken with "Default" SecretKey and got the token string > How do I use this token to call SetObjects ?

3. Do I need to change perrmission so that players can get Title objects, and how?

I know how to setup Entity type and ID as title(use "title" and Title ID)

This is still in development but it will be used as a tool to update data for all the players.

Thank you very much

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

·
Sarah Zhang avatar image
Sarah Zhang answered

>> Can i upload/set title Objects or files from web console?

If the web console means Playfab Game Manager. No, you cannot set or upload Title Entity Objects in the PlayFab Game Manager. But PlayFab supports setting Title Data in Game Manger. Title Data is a set of key/value pairs that you can use to manage configuration for your game remotely. You can set this data in Game Manager, or via API SetTitleData. General Title Data can be read by the custom and internal Title Data cannot be accessed by clients directly. If you haven’t learned about PlayFab Title Data, please navigate to the documentation Title Data for more information about it. Besides, clients can read the Title Data via client API GetTitleData directly. Please let us know if Title Data can meet your requirements.

>> Do I need to change permission so that players can get Title objects, and how?

Technically, it can be implemented. But in the consideration of safety, we would not suggest you change permissions to let players can access Title Objects directly. If PlayFab Title Data can’t meet your requirements and it’s necessary for you to use Title Entity Objects to store the data, we would suggest you call entity.GetObjects on CloudScript to request the Title’s entity objects, then let players call ExecuteEntityCloudScript to get the data you needed from the corresponding CloudScript function.

>> I have logged in as a player > I used GetEntityToken with "Default" SecretKey and got the token string > How do I use this token to call SetObjects ?

If you are developing an administration tool for your game, and now you want to get permission to do operations for the title entity. Please don’t log a player in before you call the GetEntityToken for the title. If you logged a player in then call GetEntityToken, you would receive the player’s entity. The correct steps would be something like this.

  • If you are using Unity, enable the Entity API in the Unity PlayFab extension. Only when you are developing an administration tool, enable Admin API. (Please don’t enable Admin and Server API in any client build.)
  • If you are using Unity, confirm you have set the Title Id and secret key in the Extension or PlayFabSharedSettings. Or you can set them using such statements.
  if (string.IsNullOrEmpty(PlayFabSettings.staticSettings.TitleId))
            {
                
                PlayFabSettings.staticSettings.TitleId = "[YourTitleID]";
                PlayFabSettings.staticSettings.DeveloperSecretKey = "[YourSecretKey]";


            }
    2 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.

    baneand avatar image baneand commented ·

    @Sarah Zhang Thank you very much for a quick response

    I guess I can use Title Data for data that all users can access.
    What are the store limits for these storage? I guess I must pay if I store more than the limits?
    I can't seem to find some kind of page with those limits and I am sure i saw that before your price model change.

    Thank you

    0 Likes 0 ·
    Sarah Zhang avatar image Sarah Zhang baneand commented ·

    You can navigate to [GameManager->[Title Settings]->[Limits] (https://developer.playfab.com/en-US/[YourTitleId]/limits) to check the limits of your title.

    1 Like 1 ·

    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.