PhotonTarget to one player?
Options
Dear Photon developers,
I want to send to player with ID number 2 an RPC call, but how can I do that?
If I use:
photonView.RPC("ReceivedCards", PhotonTargets.All, SortedScards2[i].name);
I can only choose All players or All bufferd etc.
Can someone help me out with this question.
With kind regards
Speedt4
I want to send to player with ID number 2 an RPC call, but how can I do that?
If I use:
photonView.RPC("ReceivedCards", PhotonTargets.All, SortedScards2[i].name);
I can only choose All players or All bufferd etc.
Can someone help me out with this question.
With kind regards
Speedt4
0
Comments
-
After doing some more research I have found the solution.
You can use the following:
photonView.RPC("ReceivedCards", PhotonPlayer.Find(1), this.gameObject.name);
The find statement needs the userid.
With kind regards
Speedt41 -
Hi, if u are online, 4 years later photonplayer gives me error. i use photon2. is that updated? if updated what is that now?0
-
https://doc-api.photonengine.com/en/pun/v2/class_photon_1_1_realtime_1_1_player.html#abac8817ce9e535a2feb8a91953aa4f61
Photon.Realtime.Player.Get()
maybe ?0 -
Hi @HalilHalit,
Thank you for choosing Photon!
As @ThomasKao_XRSpace found out, PhotonPlayer from PUN Classic is renamed to Player (in Photon.Realtime namespace) in PUN 2.
You can find more about what changed in PUN 2 here.0