예제 #1
0
 public override void Apply()
 {
     base.Apply();
     if (vertChanged)
     {
         custom.uIVertices = vertex;
         custom.triangle   = tris;
         custom.SetVerticesDirty();
         vertChanged = false;
     }
 }
예제 #2
0
    void VertexCalculation(CustomRawImage raw)
    {
        var vert = new List <UIVertex>();
        var tri  = new List <int>();

        for (int i = 0; i < transform.childCount; i++)
        {
            var c    = transform.GetChild(i);
            var help = c.GetComponent <ShareChild>();
            if (help != null)
            {
                help.GetUVInfo(vert, tri, Vector3.zero, Quaternion.identity, Vector3.one);
            }
        }
        raw.uIVertices = vert;
        raw.triangle   = tri;
        raw.SetVerticesDirty();
    }