internal static UIPartActionLabelImproved CreateTemplate(UIPartActionLabel oldLabel) { GameObject labelGo = (GameObject)Instantiate(oldLabel.gameObject); Destroy(labelGo.GetComponent<UIPartActionLabel>()); UIPartActionLabelImproved label = labelGo.AddTaggedComponent<UIPartActionLabelImproved>(); labelGo.SetActive(false); label.transform.parent = oldLabel.transform.parent; label.transform.localPosition = oldLabel.transform.localPosition; return label; }
internal static UIPartActionLabelImproved CreateTemplate(UIPartActionLabel oldLabel) { GameObject labelGo = (GameObject)Instantiate(oldLabel.gameObject); Destroy(labelGo.GetComponent <UIPartActionLabel>()); UIPartActionLabelImproved label = labelGo.AddTaggedComponent <UIPartActionLabelImproved>(); labelGo.SetActive(false); label.transform.parent = oldLabel.transform.parent; label.transform.localPosition = oldLabel.transform.localPosition; return(label); }