Пример #1
0
 public ShareImage(CustomRawImage image)
 {
     vertices = new List <UIVertex>();
     tri      = new List <int>();
     rawImage = image;
     //callBack = EventCallBack.RegEvent<EventCallBack>(image.rectTransform);
 }
Пример #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();
    }
Пример #3
0
 public override void LoadToObject(Component game)
 {
     base.LoadToObject(game);
     custom = Context as CustomRawImage;
 }