Fixed player and clone color
This commit is contained in:
@@ -8,6 +8,10 @@ public class PlayerController : NetworkBehaviour
|
||||
[SerializeField] private GameObject tpvHands;
|
||||
[SerializeField] private GameObject fpvHands;
|
||||
|
||||
[Header("Colors")]
|
||||
[SerializeField] private Color ownerColor = Color.blue;
|
||||
[SerializeField] private Color otherPlayerColor = Color.red;
|
||||
|
||||
public override void OnNetworkSpawn()
|
||||
{
|
||||
if (playerCamera != null)
|
||||
@@ -25,7 +29,7 @@ public class PlayerController : NetworkBehaviour
|
||||
Cursor.visible = false;
|
||||
}
|
||||
|
||||
Color playerColor = IsOwner ? Color.blue : Color.red;
|
||||
Color playerColor = IsOwner ? ownerColor : otherPlayerColor;
|
||||
foreach (MeshRenderer meshRenderer in GetComponentsInChildren<MeshRenderer>())
|
||||
{
|
||||
meshRenderer.material.color = playerColor;
|
||||
|
||||
Reference in New Issue
Block a user