using System.Collections;
using UnityEngine.UI;
using System.Collections.Generic;
using UnityEngine;
[RequireComponent(typeof(Image))]
public class VariantImage : BaseMeshEffect
{
public Vector2[] offset=new Vector2[4];
public override void ModifyMesh(VertexHelper vh)
{
List<UIVertex> stream=new List<UIVertex>();
vh.GetUIVertexStream(stream);
UIVertex vertex = new UIVertex();
for (int i = 0; i < vh.currentVertCount && i < offset.Length;i++)
{
vh.PopulateUIVertex(ref vertex, i);
vertex.position = vertex.position + new Vector3(offset[i].x,offset[i].y,0);
vh.SetUIVertex(vertex, i);
}
}
}