UV() public method

UV
public UV ( int index ) : Vector4
index int
return UnityEngine.Vector4
        /// <summary>
        /// セルマップの指定
        /// </summary>
        /// <param name="index"></param>
        /// <param name="mapIndex"></param>
        public void SetCellMap(int index, int mapIndex)
        {
            cellMap_   = part_.Root.CellMap(index);
            cellIndex_ = mapIndex;

            // UV
            size_ = new Vector2(cellMap_.Width(mapIndex), cellMap_.Height(mapIndex));
            uv_   = cellMap_.UV(mapIndex);

            // PIVOT
            var pivot = cellMap_.Pivot(mapIndex);

            position_           = new Vector3(size_.x * -pivot.x, size_.y * -pivot.y, 0);
            rectTransform.pivot = pivot;
            rectTransform.SetSizeWithCurrentAnchors(RectTransform.Axis.Horizontal, size_.x);
            rectTransform.SetSizeWithCurrentAnchors(RectTransform.Axis.Vertical, size_.y);
            part_.GetComponent <RectTransform>().pivot = rectTransform.pivot;
            part_.GetComponent <RectTransform>().SetSizeWithCurrentAnchors(RectTransform.Axis.Horizontal, size_.x);
            part_.GetComponent <RectTransform>().SetSizeWithCurrentAnchors(RectTransform.Axis.Vertical, size_.y);

            UpdateVertices();
            SetMaterialDirty();
        }
        /// <summary>
        /// セルマップの指定
        /// </summary>
        /// <param name="index"></param>
        /// <param name="mapIndex"></param>
        public void SetCellMap( int index, int mapIndex )
        {
            cellMap_ = part_.Root.CellMap( index );
            cellIndex_ = mapIndex;

            // UV
            size_ = new Vector2( cellMap_.Width( mapIndex ), cellMap_.Height( mapIndex ) );
            uv_ = cellMap_.UV( mapIndex );

            // PIVOT
            var pivot = cellMap_.Pivot( mapIndex );
            position_ = new Vector3( size_.x * -pivot.x, size_.y * -pivot.y, 0 );
            rectTransform.pivot = pivot;
            rectTransform.SetSizeWithCurrentAnchors( RectTransform.Axis.Horizontal, size_.x );
            rectTransform.SetSizeWithCurrentAnchors( RectTransform.Axis.Vertical, size_.y );
            part_.GetComponent<RectTransform>().pivot = rectTransform.pivot;
            part_.GetComponent<RectTransform>().SetSizeWithCurrentAnchors( RectTransform.Axis.Horizontal, size_.x );
            part_.GetComponent<RectTransform>().SetSizeWithCurrentAnchors( RectTransform.Axis.Vertical, size_.y );

            UpdateVertices();
            SetMaterialDirty();
        }