question

Andrea Galet avatar image
Andrea Galet asked

Difference between PlayFabCloudScriptAPI.ExecuteFunction and PlayFabCloudScriptAPI.ExecuteEntityCloudScript

Hi, i would like to now what are the differences between PlayFabCloudScriptAPI.ExecuteEntityCloudScript and PlayFabCloudScriptAPI.ExecuteFunctAnd How exactly i can GetEntityToken for these functions on server?

CloudScriptentitiesAuthentication
1 comment
10 |1200

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

Andrea Galet avatar image Andrea Galet commented ·

I'm using Unity

0 Likes 0 ·

1 Answer

·
Xiao Zha avatar image
Xiao Zha answered

The ExcuteFunction API is used to execute Azure Function, you can refer to PlayFab CloudScript using Azure Functions - PlayFab | Microsoft Learn to have more information about Azure Function.

The ExcuteEntityCouldScript is used to execute CouldScript and will pass the currentEntity into the Could Script, you can refer to CloudScript (Legacy) quickstart - PlayFab | Microsoft Learn to have more information about CouldScript. Also, there is another API called ExecuteCouldScript which is also used to execute CouldScript, but won’t pass the currentEntity into CouldScript, for more information, you can refer to "CloudScript/ExecuteEntityCloudScript" vs "Client/ExecuteCloudScript" - Playfab Community to know the differences.

Since CouldScript and Azure Function are serverless services for those who don't have a dedicated server but need some server-side logic code, you don't need to call them on the server. If you do need to execute CouldScript or Azure Function on server, you can call Server-Side Cloud Script - Execute Entity Cloud Script - REST API (PlayFab CloudScript) | Microsoft Learn and Server-Side Cloud Script - Execute Function - REST API (PlayFab CloudScript) | Microsoft Learn with a title level entity token and specify the Entity parameter. You can call GetEnttityToken API with SecretKey and empty request body to get title level entity token.

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.