Photon Cloud Networking: OnPhotonSerializeView Not Firing

Photon Cloud Networking: OnPhotonSerializeView Not Firing

http://answers.unity3d.com/questions/313053/photon-cloud-networking-onphotonserializeview-not.html

I think i had the same problem. I solved it by rereading the Marco Polo tutorial. It says

We need another script. Create a “NetworkCharacter” C# script in the Marco Polo folder. Add it to the “monsterprefab” and make it the observed component of the PhotonView(drag & drop).

This means that we first have to have a PhotonView on our prefab, then we need to add this NetworkCharacter script to our prefab and then we need to drag this NetworkCharacter script to the Observe property of our PhotonView.

Now the Observe property will look like this

Observe: (NetworkCharacter) [] CarPrefab

Instead of this

Observe: (UnityEngine.Transform) [] CarPrefab

Now the OnPhotonSerializeView will fire

I hope this helps

原文地址:https://www.cnblogs.com/cnsoft/p/3431885.html