Unity Photon Steam Friend Invite
The whole answer can be found below.
Try Our
Documentation
Please check if you can find an answer in our extensive documentation on PUN.
Join Us
on Discord
Meet and talk to our staff and the entire Photon-Community via Discord.
Read More on
Stack Overflow
Find more information on Stack Overflow (for Circle members only).
Unity Photon Steam Friend Invite
NerfeR
2018-04-04 23:15:45
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!
Comments
Wow, can't any body help me?
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<GameRichPresenceJoinRequested_t> m_GameRichPresenceJoinRequested;
//Creating the callback write it on void start
m_GameRichPresenceJoinRequested = Callback<GameRichPresenceJoinRequested_t>.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);
}
Unironically, thanks a ton for replying to your own post about this, it's frustratingly difficult to find any reasonable information on this.
Thanks a lot for replying on your own comment :D
It helped me alot
Back to top