GameObject panel = GameObject.Find("Panel"); UIButton button = NGUITools.FindInChild(panel, "Button");
GameObject listItem = GameObject.Find("ListItem"); UILabel label = NGUITools.FindInChildIn this example, we find a list item object by its name "ListItem". We then use the FindInChild function to search for a UILabel component within the transform of the list item object, using the name "Label". This function returns the first UILabel component it finds within the transform's children. NGUITools is part of the NGUI package library, which provides extensive tools for creating and optimizing UI in Unity games.(listItem.transform, "Label");