/// <summary> /// 显示信息 /// </summary> /// <param name="username">玩家名称</param> /// <param name="userid">玩家id</param> /// <param name="ip">玩家ip</param> /// <param name="head"></param> public void ShowInfo(string username, string userid, string ip, YxBaseTextureAdapter head) { ShowParent.SetActive(true); UserName.text = username; UserID.text = userid; UserIP.text = ip; _userHead.mainTexture = head.GetTexture(); }
/// <summary> /// 设置 图片内容 /// </summary> /// <param name="component"></param> /// <param name="value"></param> /// <returns></returns> public static bool TrySetComponentValue(this YxBaseTextureAdapter component, Texture2D value) { if (component) { component.SetTexture(value); return(true); } return(false); }