Setting up player infomation on join

Options
Hi,

I wonder what would be the best way to send the new joining the player information from the master client as he joins.
I prefer not to use playerProperties, I keep the information about every player on the his GameObject, as a new player joins the room the master client should send the information from his version of the GO to the new players' GO that is created automatically because of PhotonNetwork.Instantiate.

I just wonder if there's a function that runs at the same time as the instantiation msg. I tried using AllBuffered, but it only sends the variables that were set at the first time that the function is called, so that doesn't help me.

EDIT: Found out about the ownership transfers, don't remember that feature from the past. Gonna try that and see how that goes.
The Player information passing question is still up.

Thanks ahead,
Michael.

Comments

  • vadim
    Options
    Hi,

    Handle OnPhotonInstantiate message on master client and send RPC with object state to the player who triggered the message.

    Note: if you synchronize full GO state with OnPhotonSerializeView then you get update on join automatically w/o any additional effort.