GameObject parentObject = GameObject.Find("ParentObject"); GameObject childObject = NGUITools.FindChild(parentObject, "ChildObject");
GameObject panel = GameObject.Find("Panel"); GameObject label = NGUITools.FindChild(panel, "Label"); UILabel labelComponent = label.GetComponentIn this example, FindChild is used to find a child object named "Label" that is a child of a panel object named "Panel". Once the label object is found, its UILabel component is retrieved and stored in a variable for further use. NGUITools is typically included in the package/library provided by the NGUI plugin for Unity game engine.();