在unity3d C#中获取Next Sibling gameobject(transform)方法

时间:2014-12-09 20:17:39

标签: unity3d nextsibling

查找类似的方法或库:

GameObject nextBrotherNode= gameObject.transform.getNextSibling();

1 个答案:

答案 0 :(得分:10)

你的意思是

int index = transform.GetSiblingIndex();
GameObject nextBrotherNode = transform.parent.GetChild(index + 1).gameObject;