public static ReattachSelf ( RectTransform trans, ReattachCallback callback ) : void | ||
trans | RectTransform | |
callback | ReattachCallback | |
Результат | void |
/* Setter & Getter */ /* Functions */ private void Start() { this.mRectTransform = this.GetComponent <RectTransform>(); List <RectTransform> childs = JCS_Util.ForceDetachChildren(this.mRectTransform); JCS_Util.ReattachSelf(this.mRectTransform, (parent) => { mRectTransform.localScale = Vector3.one; mRectTransform.sizeDelta = new Vector2(Screen.width, Screen.height); }); JCS_Util.AttachChildren(this.mRectTransform, childs); mRectTransform.localPosition = Vector3.zero; }