|
I have a child object that needs to find the first parent object with a certain tag. Parent Object ("Foo tag") \ Child Object \ Child Object | Child Object | Child Object \ Child Object (needs to traverse up the tree until it finds the "Foo tag" I can't just do a find for the foo tag because I have multiple objects with that tag - I need to find the one that is a parent of this child.
(comments are locked)
|
|
See comments above for answer. It is working great.
(comments are locked)
|
|
Imagine a form with three uls (as sections). Each section has several 'li checkbox /li' and the last one says Check/Uncheck All. Here is the code, which will change all checkboxes in same ul.
(comments are locked)
|
|
I hope this helps someone -- and please correct me where I'm wrong!
(comments are locked)
|

I could loop through each parent until I find the tag. parent = transform.parent while (parent != null) { if (parent.tag == "Foo tag")... }
That's exactly how you'll need to do it