question

Nicholas avatar image
Nicholas asked

Handling Multiple JS Files/Modules

In Cloudscript, I would like to use multiple files as we have a reasonable amount of code.

Some of these files rely on each other, and thus we need dependency management.

Is there a way to do this? Having just started with playfab, I'm wondering if we should just be using Azure Functions for this sort of thing, as they look much more mature.

CloudScript
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

·
Citrus Yan avatar image
Citrus Yan answered

Cloud Script is using a V8 JavaScript implementation, currently we can’t support modules/files yet. And, yes, I would suggest you use Azure Function for this, which is more flexible and manageable. Moreover, PlayFab offers the new feature CloudScript using Azure Functions, please take a look.

5 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.

Nicholas avatar image Nicholas commented ·

Thanks! I followed the tutorial as much as I could, mostly setting up the Azure function example.

The Azure function preview tab in GameManager->Automation does not show, the tab is simply missing.

Is this because I'm on the essentials tier? Or does it need to be enabled somewhere?

0 Likes 0 ·
Nicholas avatar image Nicholas Nicholas commented ·

Weird, it's there now

1 Like 1 ·
Citrus Yan avatar image Citrus Yan Nicholas commented ·

Essential tiers should be able to enable it too. Have you successfully enabled it?

0 Likes 0 ·
Show more comments

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.