question

khattabkhairdeen avatar image
khattabkhairdeen asked

Should i enable the server API on my project that will be built for players?

Hey guys. Im using Unity for Playfab and i am creating a system that stores user items in their user data and then when they log back in, to receive their items im going to use the server api request of GrantItemsToUser. the problem is, im not sure if i have to make a separate unity project or something to enable the server api on that rather than on the same one as the clients, since i know that server builds and client builds are different, but this seems quite counter intuitve, so could anyone please tell me whether i can just enable the server api on my player's build/project or if not, could you provide alternatives since i need the Server APi calls to grant items, thank you!

apissdks
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

·
Made Wang avatar image
Made Wang answered

It needs to be clarified that calling server api on the client side is not recommended. You can try to use Azure Function or build your own server.

If you want to call the server api on the server that built with Unity, you can check ENABLE SERVER API in PlayFabEditorExtensions->SETTINGS->API. As shown below:


set.png (18.9 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.

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.