Quantcast
Channel: Photon Unity Networking (PUN) — Photon Engine
Viewing all articles
Browse latest Browse all 8947

Photon Friends list while connected to Room

$
0
0
Hi Photon,

I am using below pasted code to get my friends status from photon i.e if they are online and in lobby or in some room. Everything works as expected if "FindFriends" calling peer is not connected to any room and is currently only in lobby.



Code:
void findOnlineFriends()
	{
		string[] _friendList = PlayerDataManager.instance.friendsList.ToArray ();
		PhotonNetwork.FindFriends (_friendList);
	}

public void OnUpdatedFriendList()
	{
		Debug.Log("Updated: " + PhotonNetwork.Friends.Count.ToString());
		if (onListUpdated != null) {
			onListUpdated ();
		}
	}
Errors:
1. Operation failed: OperationResponse 222: ReturnCode: -2 (Unknown operation code). Parameters: {} Server: GameServer
UnityEngine.Debug:LogError(Object)
2. FindFriends failed to apply the result, as a required value wasn't provided or the friend list length differed from result.
UnityEngine.Debug:LogError(Object)

Viewing all articles
Browse latest Browse all 8947

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>