public virtual void setCustomColorsPlayer(GameObject go, GameProfileCustomItem customItem) { GameCustomPlayer player = go.GetComponent <GameCustomPlayer>(); if (player == null) { GameCustomPlayer[] players = go.GetComponentsInChildren <GameCustomPlayer>(true); foreach (GameCustomPlayer playerTo in players) { player = playerTo; break; } } if (player != null) { GameCustomController.SetMaterialColors(go, customItem); } }