So I am suddenly having a problem with the instantiation of my objects. This started happening after I changed something and even when I revert my changes the warnings still happen so I’m not sure if it is just my scripting or something else. But there are two errors that always appear. This one Received OnSerialization for view ID XXXX. We have no such PhotonView! Ignored this if you're leaving a room. State: Joined
always appears when I load the next scene and instantiate my players. Then I use PhotonNetwork.InstantiateSceneObject()
for my enemies. Both player and enemies have a photonview before getting instatiated but I don’t think they are getting assigned. The way that I load my scene is just using the regular PhotonNetwork.LoadLevel(level#)
Which brings me to my other error which occurs when I deal any damage to ‘some’ enemies which is this error Received RPC "RPC_NAME" for viewID X but this PhotonView does not exist! Was remote PV. Remote called. By: 1 Maybe GO was destroyed but RPC not cleaned up.
Tried a bunch of different things and looked up some other solutions which is why I use scene objects and loadlevel but it still does the same thing.
Here is where I instantiate my network prefab pick for players and enemy: PhotonRoomCustomMatch - Pastebin.com
This is the script where I instantiate my enemy scene object: PhotonEnemy - Pastebin.com