protected override void OnInit(object userData) { RectTransform rectTransform = transform.GetComponent <RectTransform>(); rectTransform.anchorMin = Vector2.zero; rectTransform.anchorMax = Vector2.one; rectTransform.anchoredPosition = Vector2.zero; rectTransform.sizeDelta = Vector2.zero; Name = Name.Replace("(Clone)", string.Empty); gameObject.SetLayerRecursively(5); base.OnInit(userData); BaseUiAction = (baseUIAction)userData; BaseUiAction?.OnInit?.Invoke(gameObject, BaseUiAction.InitUserData); }
protected override void OnOpen(object userData) { base.OnOpen(userData); BaseUiAction = (baseUIAction)userData; BaseUiAction?.OnOpen?.Invoke(gameObject, BaseUiAction.InitUserData); }