Slide 29
Slide 29 text
[PT0] クリック座標を送信するRPCの作成
[PunRPC]
private void NotifyClick(string sender, Vector3 position)
{
AppendLog($"{sender}> {position}");
}
private void Update()
{
if (PhotonNetwork.InRoom && Input.GetMouseButtonDown(0))
{
var sender = PhotonNetwork.NickName;
var position = Input.mousePosition;
_photonView.RPC("NotifyClick",
RpcTarget.AllViaServer, sender, position);
}
}