Beispiel #1
0
        public override void Awake()
        {
            base.Awake();

            mButton = GetComponent <Button> ();
            mButton.interactable = _Interactive;

            mText  = GetComponentInChildren <Text> ();
            mImage = mButton.image;

            mAnim2D = GetComponent <UIAnim2D>();
            if (mAnim2D != null)
            {
                mAnim2D.AddAnimUpdateListener(AnimUpdate);
            }
        }
Beispiel #2
0
        public override void Awake()
        {
            base.Awake();

            mRawImage = GetComponent <RawImage>();
            mImage    = GetComponent <Image>();

            if (mRawImage == null && mImage == null)
            {
                Debug.LogWarning("UIImage needs either RawImage or Image component");
            }

            mAnim2D = GetComponent <UIAnim2D>();
            if (mAnim2D != null)
            {
                mAnim2D.AddAnimUpdateListener(AnimUpdate);
            }
        }