protected override void Awake() { base.Awake(); if (RectTrans == null) { RectTrans = GetComponent <RectTransform>(); } if (Presenter == null) { Presenter = GetComponent <BasePresenter>(); } if (Presenter == null) { CLog.Error("UITransition 没有 Presenter:{0}", BaseUIUtils.GetPath(gameObject)); } if (RectTrans != null) { Graphic = RectTrans.GetComponent <Graphic>(); Effect = RectTrans.GetComponent <BaseMeshEffect>(); } if (Graphic != null) { if (Graphic is Text) { Text = (Text)Graphic; } if (Graphic is Image) { Image = (Image)Graphic; } RectTrans = Graphic.rectTransform; } if (Effect != null) { if (Effect is Shadow) { Shadow = (Shadow)Effect; } if (Effect is Outline) { Outline = (Outline)Effect; } } }