Unity Photon Steam Friend Invite
Options
Hello,
I am the founder of Partical Studios. Currently we're working on a new game. We're using Photon Networking for our new game. But i have a problem about Steam Invite.
I am creating a room in game then i want to invite my steam friends to the room. For this;
CSteamID invitedUserId = (CSteamID)0;
SteamFriends.ActivateGameOverlayInviteDialog(invitedUserId);
When he acceptes the invite, how can i bring him to my room? I want him to join my room directly.
Please help me, thanks!
I am the founder of Partical Studios. Currently we're working on a new game. We're using Photon Networking for our new game. But i have a problem about Steam Invite.
I am creating a room in game then i want to invite my steam friends to the room. For this;
CSteamID invitedUserId = (CSteamID)0;
SteamFriends.ActivateGameOverlayInviteDialog(invitedUserId);
When he acceptes the invite, how can i bring him to my room? I want him to join my room directly.
Please help me, thanks!
0
Comments
-
Wow, can't any body help me?0
-
Well okay. Some one helped me and finally i have made it.
First you need to create a callback from GameRichPresenceJoinRequested_t (it's in unity steamworks api)
Then you need to bring him to your room with the room's name.
Example Code:
//The Callback
protected Callback m_GameRichPresenceJoinRequested;
//Creating the callback write it on void start
m_GameRichPresenceJoinRequested = Callback.Create(OnGameRichPresenceJoinRequested);
//When the player accepts the invite
//Create a void to join the game. Then start the void with the connection string.
private void OnGameRichPresenceJoinRequested(GameRichPresenceJoinRequested_t pCallback) {
JoinGame(pCallback.m_rgchConnect);
}
2 -
Unironically, thanks a ton for replying to your own post about this, it's frustratingly difficult to find any reasonable information on this.0
-
Thanks a lot for replying on your own comment :D
It helped me alot
0