public void AddLabel(MyLabel l, bool setparent, bool update) { if (!l.do_not_display) { if (setparent) { l.transform.SetParent(transform); l.transform.localScale = Vector3.one; l.transform.localRotation = Quaternion.identity; list.Add(l); } // l.SetPanel(this); transforms.Add(l.GetComponent <RectTransform>()); if (update) { UpdatePanel(); } } l.InitButton(); }