|
|
@@ -49,8 +49,11 @@ public class RoleMgr
|
|
|
private static Dictionary<string, Sprite> remoteAvatarMap = new Dictionary<string, Sprite>();
|
|
|
private static IEnumerator LoadAvatar(string url, Image image)
|
|
|
{
|
|
|
- if (url == null) url = "";
|
|
|
- Debug.Log(remoteAvatarMap.Count);
|
|
|
+ if (string.IsNullOrWhiteSpace(url))
|
|
|
+ {
|
|
|
+ image.sprite = null;
|
|
|
+ yield break;
|
|
|
+ }
|
|
|
if (remoteAvatarMap.ContainsKey(url))
|
|
|
{
|
|
|
image.sprite = remoteAvatarMap[url];
|