Stop sending position updates from scene objects
Options
We use the requestownership on scene objects to control movement by the requesting owner, which will then send position updates to other corresponding objects for the other players. These scene objects can become deactivated (not actually .active=false, but an isActive flag set)...when this is the case we would like for the owning player to cease sending position information to save bandwidth. The scene object has a transform view, but no associated script where we can early-out of a onserializeview function or anything...is there a way we can do this?
Thanks
Thanks
0
Best Answers
-
Yes, if the object doesn't change the observed values (position, e.g.), then it will stop sending updates.
If you wanted to drop updates for other reasons, then you need a script, which becomes the observed component for the PhotonView. Implement the OnPhotonSerializeView method and write a logic that returns null, when you don't want the object to send news.5 -
Thanks5
Answers
-
So, if the photonView attached to the scene object is unreliable on change, then updates are only sent when they change, so no problem then?0
-
Yes, if the object doesn't change the observed values (position, e.g.), then it will stop sending updates.
If you wanted to drop updates for other reasons, then you need a script, which becomes the observed component for the PhotonView. Implement the OnPhotonSerializeView method and write a logic that returns null, when you don't want the object to send news.5 -
Thanks5