Change color
My question is simple, I have the following script:
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
using UnityEngine; using System.Collections; public class ChangeColor : Photon.MonoBehaviour { public Material PlayerRedMat; public Material PlayerBlueMat; void Awake() { if(respawns.respawnCT) { renderer.material = PlayerRedMat; }else { 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
0
Comments
-
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.0 -
thanks for your reply but as i say I'm new, and really dont know how to modify the script :x0
-
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.0 -
Don't worry, I resolved ...0
-
8-)0