PhotonView has multiple times the same RPC

Options
Hello everyone,

I am having trouble with the RPCs in my game.

When I run the game with one client as the unity editor, the editor shows the error below and the game crashes:
~~~~~~~~~~~
PhotonView with ID <x> has 2 methods "RPC name" that takes 6 argument(s): String, Vector3, Quaternion, String, String, Vector3. Should be just one?
~~~~~~~~~~~

However when I run the game with two builded clients(no editor) the game does not crash but the RPCs are sent 2 times on each client (as the error says the photonView has 2 RPCs of that type).

I have refreshed the RPC list on the ServerSettings and tried some really stupid methods of figuring out what is the problem, but I am out of ideas right now.

Thank you for reading,
Angel

Comments

  • Tobias
    Options
    The problem is not the RPC list but your implementation.
    It seems that more than one class has a method that's fitting for the RPC (same name and same parameter-count).

    I think the crash is some bug. I will have to investigate but this won't happen this year anymore, sorry.
  • Ok, the problem was for only a few RPCs on a ManagerSingletonClass that was composed of a SceneObject photonView.

    I just transfered those RPCs to the playersObject NetworkController that is not a sceneObject and reference from there.

    I don't know why the error message was the above, but that seemed to solved the error.

    Thanx for the quick response Tobias anyway.