Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get Next Sibling gameobject(transform) Method in unity3d C#

looking a method or a Library for something like this:

GameObject nextBrotherNode= gameObject.transform.getNextSibling();
like image 634
Zen Of Kursat Avatar asked Dec 09 '14 20:12

Zen Of Kursat


1 Answers

You mean

int index = transform.GetSiblingIndex();
GameObject nextBrotherNode = transform.parent.GetChild(index + 1).gameObject;
like image 58
Benjamin James Drury Avatar answered Oct 13 '22 00:10

Benjamin James Drury