[Photon] RPC ends up on synced player instead of the real remote player

So, I have a PhotonView on my player that gets Instantiated.

The problem is that when I try to send an RPC to the same object on a remote client, the view IDs won’t match and it ends up on a synced player, not the one that is controlled locally.

Any ideas?

It seems like you forgot to apply the atrribute PunRPC to the method, or your RPCs parameters don’t match the ones you use in the call?!

Nope, both correct.

Not sure what the problem was, but I eventually worked around it by using RaiseEvent instead of RPC.

As long as you don’t need the reference to a specific object, the RaiseEvent variant is actually better anyways.

Did you use inheritance in this case? Or a method that had a specific visibility?

Uh, can you explain that?

I just use RaiseEvent with an eventcode.

Sorry to confuse you.
I meant to say: It’s good you’re using RaiseEvent now. That’s fine, as it seems to work.

I still wondered why the RPCs didn’t work: When you used the RPCs and that failed, maybe your RPC method was in a class that extended some other? Or maybe the rpc method was in some other way “special”.

You don’t have to look this up. It’s OK to know you got it working now.