|
资源信息 Tutorial Information
教程名称: | ezgui如何控制clone的 scrolllist中text的属性(发帖教程) |
适用引擎: | (适用引擎,为空默认为Unity) |
教程语种: | English |
教程等级: | 1 |
教程格式: | 图文(请用IE9以上浏览器访问本版块) |
教程作者: | 多米诺 (如有问题请短消息联系作者或发表回复) |
下载地址: | 无 (兑换积分) |
直接上图- public class ScrollController : MonoBehaviour {
- public UIScrollList list;
- public GameObject itemObject;
- public GameObject testitemObject;
- public int roomCount;
- private string url="[url=http://*****/nn.aspx]http://*****/nn.aspx[/url]";
- private string txt_Name="";
- private string txt_Score="10000";
- private string txt_Message="nnn";
- string abc="";
- //public GameObject temp;
- // Use this for initialization
- void Start () {
-
- StartCoroutine(InsertMethod());
-
- }
- // Update is called once per frame
- void Update () {
- }
- IEnumerator InsertMethod()
- {
- //txt_Name=txtfield.Text;
- //print (txt_Name);
- WWWForm form=new WWWForm();
- form.AddField("post_name",txt_Name);
- form.AddField("post_score",txt_Score);
- form.AddField("post_message",txt_Message);
- WWW w=new WWW(url,form);
- yield return w;
- print (w.text);
- abc=w.text;
- //str.Substring(0,str.IndexOf("字符")+1);
- for(int i=0;i<1;i++)
- {
- UIListItem item=(UIListItem)list.CreateItem(itemObject,abc);//i*1+"\n"+w.text);//.Substring(0,w.text.IndexOf("<%@ P")+1));
- item.data=(i+1)*10;
- }
- list.SetSelectedItem(0);
-
- print (w.text);
- //return null;
-
- }
- }
复制代码 |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?立即注册
×
评分
-
查看全部评分
|