The Photon Forum
is Closed Permanently.

After many dedicated years of service, we have made the decision to retire our Forum and switch to read-only: we´ve saved the best to last! Your search result can be found below. Plus, we offer support via these channels:

Try Our

Please check if you can find an answer in our extensive documentation on PUN.

Join Us
on Discord

Meet and talk to our staff and the entire Photon-Community via Discord.

Stack Overflow

Find more information on Stack Overflow (for Circle members only).

Write Us
an E-Mail

Feel free to send your question directly to our developers.

Parameter type does not match (remote Animator)

2017-02-23 14:28:19

Hi, I am trying to read a value from a remote player's Animator.

this is one that works fine...

private int combat_anim;
private Animator anim;
combat_anim = Animator.StringToHash("combat_anim"); //in start()
anim = myDood.GetComponent(); //in start()
float weap_current_anim = anim.GetFloat("combat_anim"); //in a coroutine

this is one that does not work fine...

private int race;
private Animator anim;
race = Animator.StringToHash("race"); //in start()
anim = myDood.GetComponent(); //in start()
float tmp_remote_race = anim.GetFloat("race"); //in fixedUpdate if photonView is not mine

both are floats in the Animator and set to Discreet. Below is the full error in Unity:

Parameter type 'race' does not match.
PhotonAnimatorView:SerializeDataDiscretly(PhotonStream) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/Views/PhotonAnimatorView.cs:399)
PhotonAnimatorView:OnPhotonSerializeView(PhotonStream, PhotonMessageInfo) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/Views/PhotonAnimatorView.cs:520)
PhotonView:ExecuteComponentOnSerialize(Component, PhotonStream, PhotonMessageInfo) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonView.cs:509)
PhotonView:SerializeComponent(Component, PhotonStream, PhotonMessageInfo) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonView.cs:434)
PhotonView:SerializeView(PhotonStream, PhotonMessageInfo) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonView.cs:327)
NetworkingPeer:OnSerializeWrite(PhotonView) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:3979)
NetworkingPeer:RunViewUpdate() (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:3876)
PhotonHandler:Update() (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonHandler.cs:160)


Back to top