The error I get:
RPC call failed because the function 'IAmReady' does not exist in any script attached to'GameDirector'
So I have two game objects. One is called GameDirector which manages the logic for the current scene that is loaded (I am basically doing a bunch of multiplayer minigames). The other is called Director and this game object manages the communications to the master server and keeps track of the players and a bunch of other stuff that gives as little networking overhead as possible to the minigames so one can churn them out fast.
The problem I am having is that when the two players connect to eachother and start the game I need to make sure that both players have loaded the scene before I start instantiating the player characters (otherwise the Network.Instantiate will just get lost if a client is still loading). So I send out an RPC to all players when they have loaded. So when the player has received "IAmReady" from all other players then its time to start the game.
- The function for the RPC is inside a script of Director
- These queries are started when the GameDirector calls kDirector.DoneLoading() at the end of the Start() function of the logic script in GameDirector;
- For some reason the RPC tries to execute for scripts attached to GameDirector rather than for Director.
- The networkView.RPC call and the [RPC] function are in the same script file.
- How do you tell the networkView that the RPC should be executed on the Director instead? kDirector.networkView.RPC yields the same result.