Kaynağa Gözat

头像选择订正

lvjincheng 2 yıl önce
ebeveyn
işleme
5ba10a9153
1 değiştirilmiş dosya ile 1 ekleme ve 0 silme
  1. 1 0
      Assets/BowArrow/Scripts/View/Home/MeView.cs

+ 1 - 0
Assets/BowArrow/Scripts/View/Home/MeView.cs

@@ -291,6 +291,7 @@ public class MeView : ViewBase, MenuBackInterface
                 GameObject avatarPrefab = gridLayoutGroup.transform.Find("Avatar").gameObject;
                 for (int id = -1; id < RoleMgr.GetAvatarListLen(); id++) {
                     if (RoleMgr.IsRoleAvatar(id)) continue;
+                    if (id == -1 && string.IsNullOrWhiteSpace(LoginMgr.myUserInfo.avatarUrl)) continue;
                     GameObject avatar = GameObject.Instantiate(avatarPrefab, gridLayoutGroup.transform);
                     Image avatarImage = avatar.transform.Find("Mask/Sprite").GetComponent<Image>();
                     RoleMgr.SetAvatarToImage(avatarImage, id, LoginMgr.myUserInfo.avatarUrl);