private void Awake() { UIWidget component = base.GetComponent <UIWidget>(); if (null != component) { UICoverSafeArea uicoverSafeArea = UnityEngine.Object.FindObjectOfType <UICoverSafeArea>(); if (null != uicoverSafeArea) { this.FitAnchorPoint(component, uicoverSafeArea.transform); component.updateAnchors = UIRect.AnchorUpdate.OnEnable; } } }
private void Awake() { UIWidget component = base.GetComponent <UIWidget>(); if (null != component) { UICoverSafeArea uicoverSafeArea = UnityEngine.Object.FindObjectOfType <UICoverSafeArea>(); if (null != uicoverSafeArea) { UIPanel component2 = uicoverSafeArea.GetComponent <UIPanel>(); if (null != component2) { this.FitAnchorPoint(component, component2); this.SetAnchorExcute(component); } } } }
private void Awake() { UIWidget component = base.GetComponent <UIWidget>(); if (null != component) { this.coverSafeArea = UnityEngine.Object.FindObjectOfType <UICoverSafeArea>(); if (null != this.coverSafeArea) { Transform transform = base.transform; Vector3 localScale = transform.localScale; transform.parent = this.coverSafeArea.transform; transform.localScale = localScale; UICoverSafeArea.AnchorPoint anchorPoint = this.coverSafeArea.GetAnchorPoint(); component.SetAnchor(this.coverSafeArea.gameObject, Mathf.CeilToInt(anchorPoint.left), Mathf.CeilToInt(anchorPoint.bottom), Mathf.CeilToInt(anchorPoint.right), Mathf.CeilToInt(anchorPoint.top)); component.updateAnchors = UIRect.AnchorUpdate.OnUpdate; } } }