【问题标题】:Get Next Sibling gameobject(transform) Method in unity3d C#在unity3d C#中获取下一个兄弟游戏对象(转换)方法
【发布时间】:2014-12-09 20:17:39
【问题描述】:

寻找这样的方法或库:

GameObject nextBrotherNode= gameObject.transform.getNextSibling();

【问题讨论】:

    标签: unity3d nextsibling


    【解决方案1】:

    你是说

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

    【讨论】:

    • 不是孩子。只是下一个对象。在同一级别(下一个兄弟)
    • 对不起,我误解了您的要求。现已编辑。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-09-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-08-05
    相关资源
    最近更新 更多