for (int i = 0; i < s_travel1.list_travelplaceid.Count; i++)
{

GameObject item = Instantiate(mItemPrefab, transform.position, transform.rotation,mContentTransform.transform);
item.name = "travelzhangjie_" + i;
int a = i + 1;

item.transform.GetChild(0).GetChild(0).GetComponent<Text>().text = "【第"+a+"章】\u3000\u3000"+ player.TravelZhangjielist[i];
int index = i; //这里直接用i 会使最后一次i++导致 ClickZhangjie(i)的i越界。     赋值给index即可避免

item.transform.GetChild(0).GetComponent<Button>().onClick.AddListener(() => {

ClickZhangjie(index);

});

//实例化未指定父物体会导致生成的物体scale发生变化,因为会先生成在自动生成到根目录下。
//这是出现了一个问题,当实例化物体后,更改parent值,这时,实例化物体的scale值会产生相应的改变。


}