I have Photon and Steam. For example, if I want to send a person an invite to my party, how would I go about doing this for a PC game?
Here's what I have in my head:
- If I have their Playfab ID, could I have a custom info called like "pendingInvite" and make it null by default -- check every 15 seconds or so while at least 1 friend is online.
- Since there's no invite push call for PC that I know of (is there?), I should probably make a cloud code function to invite a friend. I could change pendingInvite = the player's playfab ID (I'm not good with cloud code yet, but I think I can do this).
- So when that 15 second check triggers and it's not null, pop up "you got an invite!" and clear it back to null.
Is there a better way of doing this, like with the PlayStream? Anything "pushy" for PC?
- When I want to invite someone, I'll get their Steam ID from PlayFab FriendInfo.
- I'll then use Steamworks to push a game invite via Steamworks.
- SteamWorks event stream will pick it up and it'll ask for an invite via Steam (and I could show something in-game). If they accept, the original person's steamworks event stream will let them know they accepted - and I already have their info thanks to FriendInfo.
Then....... not quite sure how to both join the same room. Perhaps:
Player2 would get another FriendInfo call and keep doing it until the Player1.PhotonRoomNumber (or whatever it's called) is not null, or after x failed attempts.