Only update OnPhotonSerializeView with PhotonTransformView
Options
I've made lag compensation with OnPhotonSerializeView.
My problem is that I want to sync my animations with a PhotonAnimatorView, but when i add it to my Observed Components, OnPhotonSerializeView udates even when the player is standing still, because of the PhotonAnimatorView, which results in a "InvalidCastException: Specified cast is not valid." error and an unnessecary amount of OnPhotonSerializeView udates.
Is there a way i can trigger OnPhotonSerializeView with PhotonTransformView changes only?
My problem is that I want to sync my animations with a PhotonAnimatorView, but when i add it to my Observed Components, OnPhotonSerializeView udates even when the player is standing still, because of the PhotonAnimatorView, which results in a "InvalidCastException: Specified cast is not valid." error and an unnessecary amount of OnPhotonSerializeView udates.
Is there a way i can trigger OnPhotonSerializeView with PhotonTransformView changes only?
0
Comments
-
I can see it is possible to have 2 PhotonViews on the same component.
So is it a good solution to just have a PhotonViews with PhotonTransformView and my CustomNetworkTransform and a PhotonViews with PhotonAnimatorView only?
Seems like OnPhotonSerializeView is only triggered when my transform changes and my animations still sync on the gameobject. (just like i wanted)0