public void SetPlayerColor(GameObject player, Material material) { PlayerInput input = player.GetComponent <PlayerInput>(); player.GetComponentInChildren <SkinnedMeshRenderer>().material = material; ActivePlayers.UpdateMaterial((int)player.GetComponent <PlayerInput>().Index, material); PlayerSelectUIManager.Instance.UpdateColor(input.Index, material); _playerMaterials[input.Index] = material; }