Make sure PhotonView viewID is not 0 in sites
This commit is contained in:
parent
228b5925b7
commit
9034590707
@ -111,6 +111,8 @@ namespace Passer {
|
|||||||
Photon.Pun.PhotonView photonView = gameObject.GetComponent<Photon.Pun.PhotonView>();
|
Photon.Pun.PhotonView photonView = gameObject.GetComponent<Photon.Pun.PhotonView>();
|
||||||
if (photonView == null)
|
if (photonView == null)
|
||||||
photonView = gameObject.AddComponent<Photon.Pun.PhotonView>();
|
photonView = gameObject.AddComponent<Photon.Pun.PhotonView>();
|
||||||
|
if (photonView.ViewID == 0)
|
||||||
|
Photon.Pun.PhotonNetwork.AllocateViewID(photonView);
|
||||||
|
|
||||||
Photon.Pun.PhotonTransformView transformView = gameObject.GetComponent<Photon.Pun.PhotonTransformView>();
|
Photon.Pun.PhotonTransformView transformView = gameObject.GetComponent<Photon.Pun.PhotonTransformView>();
|
||||||
if (transformView == null) {
|
if (transformView == null) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user