Try force SerializeView and RunViewUpdate()
Options
I am trying to force a serialize for all my observed components and then send the synchronize data. I am using reliable delta compressed on my photonview.
It triggers the OnPhotonSerializeView() and write it in the Stream, but how can i replace the NetworkingPeer "pStream".
Or is there even a way to send my own PhotonStream via Network?
My problem is i am adding observed components at runtime and im not getting any information from the other Photonview. They are not synchronized until i trigger OnPhotonSerializeView() on one side by changing a value.
The Photonview from the receiving side is "0" until i added all observed components. After that i am setting the PhotonID equal to the other.
PhotonMessageInfo info = new PhotonMessageInfo(PhotonNetwork.networkingPeer.LocalPlayer, PhotonNetwork.ServerTimestamp, myPhotonview); PhotonStream pStream = new PhotonStream(true, null); pStream.ResetWriteStream(); .myPhotonview.SerializeView(pStream, info); // Something like PhotonNetwork.networkingPeer.ChangePhotonStream(pStream) PhotonNetwork.networkingPeer.RunViewUpdate();
It triggers the OnPhotonSerializeView() and write it in the Stream, but how can i replace the NetworkingPeer "pStream".
Or is there even a way to send my own PhotonStream via Network?
My problem is i am adding observed components at runtime and im not getting any information from the other Photonview. They are not synchronized until i trigger OnPhotonSerializeView() on one side by changing a value.
The Photonview from the receiving side is "0" until i added all observed components. After that i am setting the PhotonID equal to the other.
0
Comments
-
Okay simply doing this worked ...
PhotonView.lastOnSerializeDataSent = null; PhotonNetwork.networkingPeer.RunViewUpdate();
0 -
Hm. Ok, right, that case (changing components) is not covered properly by the API.
Are you sure that delta compressed serialization is the best way to go here?
What are you doing?0