FPS drops when adding polygons

I’ll spare the details of my game - but essentially, I’m trying to make a JezzBall clone. I have a class that generates the “fill area” as a polygon whenever I finish building a wall.

If you are unfamiliar with JezzBall, basically all I’m doing is adding polygons to my game area - these can be any shape really; rectangles, irregular, regular, you name it.

Here’s my issue: every time I add a polygon, my FPS drops around 5-10, each time. As you can see, eventually my game will be unplayable. Actually, the drawing of my walls will slow down over time, which is NOT good! It should be the same speed always.

Here is the function I use to add a polygon to my game area:

public void GeneratePolygon(Polygon poly)
{
    GameObject goPoly = new GameObject();
    goPoly.transform.localPosition = new Vector3(goPoly.transform.localPosition.x,
                                     goPoly.transform.localPosition.y, -1f);

    Triangulator tr = new Triangulator(poly.Points);
    int[] indices = tr.Triangulate();

    // Create the Vector3 vertices
    Vector3[] vertices = new Vector3[poly.Points.Length];
    for (int i = 0; i < vertices.Length; i++)
    {
        vertices <em>= new Vector3(poly.Points_.x, poly.Points*.y, 0);*_</em>

}
// Create the mesh
Mesh msh = new Mesh();
msh.vertices = vertices;
msh.triangles = indices;
msh.RecalculateNormals();
msh.RecalculateBounds();
// Set up game object with mesh;
goPoly.isStatic = true;
goPoly.AddComponent(typeof(MeshRenderer));
goPoly.renderer.sharedMaterial = Resources.Load(“Gray”) as Material;
goPoly.renderer.sortingLayerName = “Foreground”;
goPoly.renderer.sortingOrder = 2;
MeshFilter filter = goPoly.AddComponent(typeof(MeshFilter)) as MeshFilter;
filter.mesh = msh;
}
And here is my Polygon class just in case it is needed:
public class Polygon
{
private Vector2[] _points;

public Vector2[] Points
{
get
{
return _points;
}
}

public Vector2 this [int i]
{
get { return points ; }
}_

public int Length
{
get { return _points.Length; }
}

public Polygon()
{
}

public Polygon(Vector2[] points)
{
_points = points;
}

public Polygon(List points)
{
_points = points.ToArray();
}

public bool Contains(Vector2 point)
{
bool isInside = false;
for (int i = 0, j = _points.Length - 1; i < _points.Length; j = i++)
{
if (((points .y > point.y) != (_points [j].y > point.y)) &&
(point.x < (points [j].x - points .x) * (point.y - points .y) / (points [j].y - points .y) + points .x))
{

isInside = !isInside;

}

}
return isInside;
}_

public float Area
{
get
{
float a = points[0].y * (points[points.Length - 1].x - points[1].x);
for (int i = 1; i < _points.Length; i++)
{

a += points.y * (points[i - 1].x - points[(i + 1) % points.Length].x);
}

return Mathf.Abs(a / 2);

}

}
}
I will not list Triangulator here, as I just found it online ([here][1] specifically)
I noticed if I disable my polygon game objects in the inspector (or delete the material) it will increase the FPS back to normal…
The material is just a Gray color “Sprites/Default” shader.
Any ideas?
_*[1]: http://wiki.unity3d.com/index.php?title=Triangulator*_

I wouldn’t say this is an exact solution, but upgrading to Unity 5 (with no additional code changes) seems to have fixed this issue! Not sure why.