- Home /
Photon RPC relationship question.
There are three scripts: Player, RED, Blue.
In a Player script, each player is required to add an RED script or a Blue script at the beginning of the game.
And store your team name in a variable called teamsname (RED for RED team, blue for blue team)
RED script ran one RPC. Code: this.photonViewRPC ("InbusRED", RpcTarget.All);
This RPC code is in the Player script. First, it runs well.
If this RPC is running, you have the teamsname variable printed out.
However, the variables of his own teamsname with this script are not output, and the variables of teamsname that the player invokes the RPC are output. For example, I'm on the RED team and I ran this RPC. Teamsname is RED. This is normal. and I'm on the Blue team and I ran this RPC. Teamsname is RED. this error. Why print this RED?