/// Get the mesh for corners for a connected tilable public static Mesh GetCornersPlane(bool[] corners) { int id = corners.Length; foreach (bool v in corners) { id = unchecked (id * 314159 + ((!v) ? 1 : 2)); } if (MeshPool.cornerPlanes.ContainsKey(id)) { return(MeshPool.cornerPlanes[id].mesh); } MeshPool.cornerPlanes.Add(id, MeshPool.GenCornersPlane(corners)); return(MeshPool.cornerPlanes[id].mesh); }