PhotonTransformViewClassic and PhotonRigidbody2DView components don't work together
Options
When I use just PhotonTransformViewClassic it works fine, but if I add the PhotonRigidbody2DView component aswell, the PhotonView component is having some issues. The error message I get, when using PhotonRigidbody2DView (together with PhotonTransformViewClassic) is the following:
InvalidCastException: Specified cast is not valid.
And it pops up every... I don't know 0.5 seconds maybe?
The error message refers to this piece of code in "PhotonView.cs":
public void DeserializeView(PhotonStream stream, PhotonMessageInfo info) { if (this.ObservedComponents != null && this.ObservedComponents.Count > 0) { for (int i = 0; i < this.ObservedComponents.Count; ++i) { var component = this.ObservedComponents[i]; if (component != null) DeserializeComponent(component, stream, info); //It is referring to this line in particular } } }
0