Beispiel #1
0
 void OnEnable()
 {
     viewElement            = (ViewElement)target;
     viewElementGroup       = viewElement.GetComponent <ViewElementGroup>();
     parentViewElement      = viewElement?.GetComponentsInParent <ViewElement>().Where(m => m != viewElement).FirstOrDefault();
     parentViewElementGroup = parentViewElement?.GetComponent <ViewElementGroup>();
     onShowHandle           = serializedObject.FindProperty("OnShowHandle");
     onLeaveHandle          = serializedObject.FindProperty("OnLeaveHandle");
     showV2Setting.valueChanged.AddListener(Repaint);
 }
        public virtual void Setup()
        {
            parentViewElementGroup = GetComponentInParent <ViewElementGroup>();
            lifeCyclesObjects      = GetComponents <IViewElementLifeCycle>().ToList();

            if (parentViewElementGroup == null || parentViewElementGroup == selfViewElementGroup)
            {
                _allGraphics = gameObject.GetComponentsInChildren <Graphic>();
            }

            CheckAnimatorHasLoopKey();
        }