question

John Peterson avatar image
John Peterson asked

Is there a CloudScript instance "initialization" procedure we can leverage?

Dear PlayFab community,

I'm wondering if there's any kind of CloudScript instance initialization process that we can potentially tie into? Something that we could use to spin up some cached objects and/or do engine-specific initialization with?

I wondered if we could use a PlayStream event, but I wasn't sure that each instance would get triggered (presuming a distributed environment).

Any insight would be much appreciated -- thank you in advance!

apisCloudScript
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

·
Joshua Strunk avatar image
Joshua Strunk answered

There is currently no documented "initialization" event for a CloudScript environment. Your best bet is having all of your handlers check if the cloud script instance is initialized and if not call an Init function to setup any cached/static objects you may need.

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.

John Peterson avatar image John Peterson commented ·

Thanks, Joshua -- that's what I figured, but I thought I'd ask. :-)

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.