unity3d - 在unity3d C#中获取下一个兄弟游戏对象(转换)方法

标签 unity3d nextsibling

寻找这样的方法或库:

GameObject nextBrotherNode= gameObject.transform.getNextSibling();

最佳答案

你的意思是

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

关于unity3d - 在unity3d C#中获取下一个兄弟游戏对象(转换)方法,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27388030/

相关文章:

unity3d - Unity导出中Android支持编译的Gradle问题

c# - Unity 中的 SQLite 数据库文件损坏

c# - 如何将数组从 C++ 库传递到 C#

jquery - 我可以通过 for 循环重复 jQuery next() 吗?

javascript - 如何在 JavaScript 中获取 lastChild、firstChild 和 nextSibling 内容?

c# - Unity Application.LoadLevel 卡住安卓设备上的游戏

c# - 使用瓷砖随机生成城市街道

javascript - 使用 previousSibling 和 nextSibling 设置属性

javascript nextsibling 函数

javascript - 获取非同级类的下一个元素