Hey can anyone tell me what is going on here?
I’m using RPCs to update player’s clothing when they connect to the server. But when this happens, each player views other players as themselves. What am I doing wrong???
I am not using static variables to hold player’s clothing IDs, but I am getting them from player prefs. Is that what may be causing the problem?
@RPC
function UpdateAppearance(){
print(curCharacter);
var c : int = curCharacter;
head.renderer.material = Resources.Load("h/h"+PlayerPrefs.GetInt("c"+c+"head")+"c"+PlayerPrefs.GetInt("c"+c+"color"));
body.renderer.material = Resources.Load("b/b"+PlayerPrefs.GetInt("c"+c+"body"));
arm1.renderer.material = Resources.Load("a/a"+PlayerPrefs.GetInt("c"+c+"body"));
arm2.renderer.material = Resources.Load("a/a"+PlayerPrefs.GetInt("c"+c+"body"));
leg.renderer.material = Resources.Load("a/a"+PlayerPrefs.GetInt("c"+c+"body"));
}