question

dan avatar image
dan asked

Photon Webhook for RoomPropertyUpdated not firing.

Hi there.

I am getting closer to having turn-based multiplayer working... but I have hit a snag.

The CloudScript below doesn't fire when I update the room's custom properties:

handlers.RoomPropertyUpdated = function (args) {
	
	server.WriteTitleEvent({
    	EventName : "room_updated"
    });
	
	//For Debugging purposes
		server.SetTitleData({
			Key: "Room Updated",
			Value: JSON.stringify(args)
		});


}; 

I have similar code set up for the other webhooks, and they seem to be firing OK. It's just this one that doesn't seem to be working. Unity receives a "Room Updated" callback, so the message is getting through... just not to PlayFab.

"Room Created", "Room Left" and "Room Closed" all seem to be working fine. IT's just the "Room Updated" callback that does nothing. :(

I scoured the examples, but couldn't find any info. Am I missing something? Did I miss a step when creating the room?

Thanks in advance,

Dan

photonwebhooks
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

What's the Title ID and the App ID for this? The only way I can think of that the webhook call wouldn't happen is if the configuration in Photon is incorrect.

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.

dan avatar image dan commented ·

Thanks, Brendan.

Title ID - B433

App ID - 3311d6d1-1323-4dd6-9b6d-17d1d40a84aa

0 Likes 0 ·
brendan avatar image brendan dan commented ·

Thanks - looking at the configuration, the key "PathGameProperties" is correctly set to "RoomPropertyUpdated", so from our side there's no reason the webhook shouldn't work. You'll need to chat with the Exit Games team for support on why the call isn't being made from Photon Realtime.

However, re-reading the above, I should also highlight that Title Data should never be updated as a result of a player action. It's really only there to be used with "Run Cloud Script function once" type Scheduled Tasks.

For what you're trying to do, I would recommend writing that to player data.

0 Likes 0 ·
dan avatar image dan commented ·

Thanks for the the info once again, Brendan! :D

The game properties are just for debugging, and will be deactivated once we are live.

I will post on the Photon forums and let you know what I find out.

Cheers,

Dan

0 Likes 0 ·
Hamza Lazaar avatar image Hamza Lazaar dan commented ·

I have answered on the PhotonEngine forum here.

For "PathEvent" and "PathGameProperties" you need too explicitly tell server to forward HTTP request using a webflag which is set using a method parameter.

0 Likes 0 ·
dan avatar image dan Hamza Lazaar commented ·

Thanks - that fixed it. If you are using PlayMaker watch out - the default actions don't handle this setting.

Thanks once again for the prompt and effective help, you guys! :D

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.