Change color

My question is simple, I have the following script:
using UnityEngine;
using System.Collections;

public class ChangeColor : Photon.MonoBehaviour
	public Material PlayerRedMat;
	public Material PlayerBlueMat;
	void Awake()
			renderer.material = PlayerRedMat;
			renderer.material = PlayerBlueMat;	

Depending on which team is the player, the color changes to red or blue ... What I have to do all players to see my current color.

PS: Sorry for my poor english, i use google translate! :x
PS2: I'm new to photon and multiplayer games, please, be patient with me :D


  • In best case, you have a array or list of materials for the teams. Each team gets a number (byte). This is what you want to send.
    This could be set as player property of the player. Those are synced automatically and distributed to new players alike.
  • thanks for your reply but as i say I'm new, and really dont know how to modify the script :x
  • I'm sorry but we can't really do that level of help. This is not really a bug or issue and it is comparably simple to pass data or set properties. This is something you can just learn by tutorials and even trial and error.
    I encourage you to check out the demos we have, browse through the code and modify things to find out how they are linked up.
  • Don't worry, I resolved ... :D
  • 8-)