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

posted @ 2013-11-19 17:34  小糊涂的超级blog  阅读(1515)  评论(0编辑  收藏  举报