/** * Readies the given item. Sets it up to be launched upon the next call to * Throw() and to render upon updates. * * Finds the first Transient object in the hierarchy and use it to represent * the readied item. */ private void ReadyItem(GameObject item) { readiedItem = item; // Note that we can't use GetComponentInChildren() here because the // children components are inactive. foreach (Transform child in item.transform) { if (transientItem = child.GetComponent<Transient>()) { transientItem.Activate(); transientItem.gameObject.SetActiveRecursively(true); break; } } }