标签:
下面这个链接里的有些unity的东西还没搞懂。。改天继续看
http://forum.unity3d.com/threads/tab-between-input-fields.263779/
1 if(Input.GetKeyDown(KeyCode.Tab)) 2 { 3 Transform gridTran = this.characterGrid.transform; 4 InputField childInputField; 5 // 这里遍历 Grid Layout Group 中的所有子节点 6 for(int i=0; i<gridTran.childCount-1; ++i) 7 { 8 childInputField = gridTran.GetChild(i).GetComponent<InputField>(); 9 if (childInputField.isFocused) 10 { 11 EventSystem.current.SetSelectedGameObject(gridTran.GetChild(i+1).gameObject); 12 break; 13 } 14 } 15 16 }
标签:
原文地址:http://www.cnblogs.com/gabo/p/4414371.html