From 9034590707fca5acbeb5de74e1c73324eea06ec5 Mon Sep 17 00:00:00 2001 From: Pascal Serrarens Date: Fri, 25 Feb 2022 14:55:52 +0100 Subject: [PATCH] Make sure PhotonView viewID is not 0 in sites --- Editor/Tools/Networking/NetworkObject_Editor.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Editor/Tools/Networking/NetworkObject_Editor.cs b/Editor/Tools/Networking/NetworkObject_Editor.cs index 3714b37..ab3b2c2 100644 --- a/Editor/Tools/Networking/NetworkObject_Editor.cs +++ b/Editor/Tools/Networking/NetworkObject_Editor.cs @@ -111,6 +111,8 @@ namespace Passer { Photon.Pun.PhotonView photonView = gameObject.GetComponent(); if (photonView == null) photonView = gameObject.AddComponent(); + if (photonView.ViewID == 0) + Photon.Pun.PhotonNetwork.AllocateViewID(photonView); Photon.Pun.PhotonTransformView transformView = gameObject.GetComponent(); if (transformView == null) {