question

avimon avatar image
avimon asked

No CloudScript response in PlayStream

I am working on Unity project with PUN integration. I have worked on CloudScirpt as it was given in Getting started with photon and unity and also defined webhooks in my photon app. For testing purpose I only created RoomCreated handler in my CloudScript. I just want to ask if I have to write some code in my unity script other than creating room with PhotonNetwork.CreateRoom() method to have RoomCreated event response visible in my PlayStream in playfab account because it is not visible? Please explain in detail.

PlayStream
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

·
brendan avatar image
brendan answered

Events in PlayStream are generated one of two ways:

1. The built-in PlayFab events are generated automatically as part of processing the logic for the call in question. For example, when a player logs into your game, the player_logged_in event is automatically generated. You can find the complete list of built-in events here: https://api.playfab.com/playstream/events.

2. You can use the WritePlayerEvent API call to generate a custom event for the player at any time.

Since the only Photon-specific event in our built-in events is for authentication (player_photon_session_authenticated), if you want to have events for things like RoomCreated, you would need to use method 2. You can call server.WritePlayerEvent from Cloud Script - there are examples of making Server API calls in the basic Cloud Script example which is automatically loaded as revision 1 in all titles.

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.