I'm trying to access the variables of the topmost parent of a multi-level hierarchy (with multiple "generations" of parents, so to speak) directly without using GameObject.Find() or the like (which require a lot of processor overhead if there are many parents.)
I can't seem to find any way other than GameObject.Find() and other 'search' functions like it. As far as I'm aware, "transform.parent" only returns the immediate parent.
I'd prefer to access it somewhat directly like "transform.parent" allows (if at all possible), so is there any generic way to do that quickly, easily, and efficiently?
↧