question

Born Lai avatar image
Born Lai asked

how to add a player tag in C#?

Hi ,

I am new in playfab.

Which api is add the player tag in C#

Thank for your

Born

unity3d
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

Hi,

PlayFab API is suitable for various platforms include C#. If you want to know the usage of PlayFab API in C#, please check the quick start for C#.

If you want to Add Player Tag via API, only Server and admin APIs is supported, see addplayertag(admin) and addplayertag(Server). They all ask you to provide secret key( If you don't know how to get it, you can refer to here) PlayFabId and TagName.

The C# SDK quick start is in https://docs.microsoft.com/en-us/gaming/playfab/sdks/c-sharp/quickstart,

The Unity SDK quick start is in https://docs.microsoft.com/en-us/gaming/playfab/sdks/unity3d/quickstart.

And please notice that we should not use admin or server API in the client, if you try to do it the right way is calling these functions in a custom server or use CloudScript. Learn more in here.

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.

Born Lai avatar image Born Lai commented ·

Hi ,Thank for your replay.

I will have a leaderboard in my unity 3D project

.And I need to display some player data (for example a full name ,not a display name) in the leaderboard .like this--->rank :Full name -age-Gender-score .Those data can not get in leaderboard result directly. Any suggestion? is it a good way to use player tag in this case?

Thank

Born

0 Likes 0 ·
Sarah Zhang avatar image Sarah Zhang Born Lai commented ·

Hi, I guess you want to display your custom data in your leaderboard UI Panel. You can use a statistic to provide these data.

Please refer this thread for details: https://community.playfab.com/questions/11103/leaderboards-and-extra-data.html. And you can read Using the Profile for Advanced Leaderboards for more.

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.