さけのさかなのブログ

同人ゲーム開発やってます。Unity使ったりする。

Unity5.2.1のUIエフェクト

 またIF変わってんじゃねえか!

    public class Hoge : BaseMeshEffect
    {
        public override void ModifyMesh(VertexHelper vh)
        {
            if (!IsActive())
            {
                return;
            }

            var list = new List<UIVertex>();
            vh.GetUIVertexStream(list);
            ModifyMesh(list);
            vh.Clear();
            vh.AddUIVertexTriangleStream(list);
        }

        void ModifyMesh(List<UIVertex> list)
        {
             // ここに処理
        }
    }