Quantcast
Channel: Recent Discussions — Photon Engine
Viewing all articles
Browse latest Browse all 15755

photon server RPC to client

$
0
0
Hi.

I'm currently using photon cloud. And trying to use photon server for load balancing. How can I RPC to client?

in client's script, I can do this:
 [PunRPC]
public void OnStartGame()
{
PhotonNetwork.room.open = false;
PhotonNetwork.LoadLevel("Main");
}
public void StartGame()
{
if (PhotonNetwork.room.playerCount >= 2)
{
photonView.RPC("OnStartGame", PhotonTargets.All);
}
}

but what about in server's script.... how can I do photonView.RPC("OnStartGame", PhotonTargets.All); this thing?

Viewing all articles
Browse latest Browse all 15755

Trending Articles