public static void ShowRankDetail(GameObject go, byte rankGrade, uint rankClass, bool isGrey = false, bool isUseSmall = false) { DebugHelper.Assert(go != null, "GameObject is NULL!!!"); DebugHelper.Assert(rankGrade > 0, "grade must be above 0!!!"); Image image = go.transform.Find("ImgRank") ? go.transform.Find("ImgRank").GetComponent <Image>() : null; Image image2 = go.transform.Find("ImgSubRank") ? go.transform.Find("ImgSubRank").GetComponent <Image>() : null; Text text = go.transform.Find("txtRankName") ? go.transform.Find("txtRankName").GetComponent <Text>() : null; if (image) { string rankIconPath = CLadderView.GetRankIconPath(rankGrade, rankClass); image.SetSprite((!isUseSmall) ? rankIconPath : string.Format("{0}_small", rankIconPath), null, true, false, false, false); image.gameObject.CustomSetActive(true); CUIUtility.SetImageGrey(image, isGrey); } if (image2) { image2.SetSprite(CLadderView.GetSubRankIconPath(rankGrade, rankClass), null, true, false, false, false); image2.gameObject.CustomSetActive(true); CUIUtility.SetImageGrey(image2, isGrey); } if (text) { text.set_text(CLadderView.GetRankName(rankGrade, rankClass)); CUIUtility.SetImageGrey(text, isGrey); } }