string GetParentID(Transform transform) { if (transform.parent == null) { return null; } return GetID(transform.parent.gameObject); }