- Home /
PUN 2, Player A not seeing Player B's hat
So currently im currently kind of new to multiplayer dev, and im trying to make a 2d multiplayer shooter, but the problem is. When Player A picks Hat and Player B picked Hat2, after the players has been instantiated both players are seeing their own hat. Meaning, in Player A's screen, Player B has the same hat as Player A, Hat1. And in Player B's screen, Player A has Hat02.
so basically
Player A selected Hat01
Player B selected Hat02
Player A's Screen
- Player A with Hat01 and Player B with Hat01
Player B's Screen
- Player A with Hat02 and Player B with Hat02
If you could help me with this, Thank you!
void Update()
{
if(!PV.IsMine)
{
return;
}
else
{
PV.RPC("HatSelected", RpcTarget.All);
}
}
[PunRPC]
public void HatSelected()
{
transform.GetChild(2).GetChild(PlayerManager.selectedSkin).gameObject.SetActive(true);
}
Comment