XDracam / unity-corelibrary

Collection of classes and extension methods that make life with Unity3D more comfortable
MIT License
15 stars 3 forks source link

Search.InSiblings / Search.InSiblingsAndChildren #23

Closed Eregerog closed 5 years ago

Eregerog commented 5 years ago

Does what is says, so one does not have to write transform.parent.Is/All/As(Search.InChildren)

XDracam commented 5 years ago

transform.parent.Is/All/As(Search.InChildren) is fine and precise, so I will skip on the overly complicated Search.InSiblingsAndChildren.

I will implement Search.InSiblings, iterating linearlzy through children of the parent including the target itself. This cannot be done elegantly in another way right now.