【发布时间】:2019-07-08 07:15:00
【问题描述】:
我正在尝试在客户端将所有人发送到角色选择场景之前需要一定数量的玩家。
在一个函数中我有......
if (PhotonNetwork.PlayerList.Length == 1 & PhotonNetwork.IsMasterClient == true)
{
PhotonView PV = PhotonView.Get(this);
PV.RPC("heroSelect", RpcTarget.All);
}
在我的代码中,我用...更改场景
[PunRPC]
void heroSelect()
{
SceneManager.LoadScene(2);
}
我收到“对象引用未设置为对象的实例”作为该行的错误
PV.RPC("heroSelect", RpcTarget.All);
【问题讨论】: