Esempio n. 1
0
        private void CheckSize()
        {
            var currWidth  = rectTransform.rect.width;
            var currHeight = rectTransform.rect.height;

            if (m_GraphWidth == 0 && m_GraphHeight == 0 && (currWidth != 0 || currHeight != 0))
            {
                Awake();
            }

            if (m_GraphWidth != currWidth ||
                m_GraphHeight != currHeight ||
                m_GraphMinAnchor != rectTransform.anchorMin ||
                m_GraphMaxAnchor != rectTransform.anchorMax ||
                m_GraphAnchoredPosition != rectTransform.anchoredPosition)
            {
                UpdateSize();
            }
            if (!ChartHelper.IsValueEqualsVector3(m_LastLocalPosition, transform.localPosition))
            {
                m_LastLocalPosition = transform.localPosition;
                OnLocalPositionChanged();
            }
        }