void ThreadMeshData(MeshData meshData, Vector3 center, MarchingCubeChunkSetting chunkSetting, NoiseSetting noiseSetting, Action <MeshData> callback)
    {
        List <MarchingCube> cubes = MarchingCubeChunk.InitVertices(center, chunkSetting, noiseSetting);

        Vector3[] vertices = MarchingCubeChunk.GenerateVertices(cubes);
        meshData.cubes     = cubes;
        meshData.vertices  = vertices;
        meshData.triangles = MarchingCubeChunk.GenerateTriangles(vertices);
        meshData.uvs       = biomeSetting.GenerateUVS(this.chunkSetting, vertices);

        lock (meshDataThreadInfoQueue)
        {
            meshDataThreadInfoQueue.Enqueue(new GeneratorThreadInfo <MeshData>(callback, meshData));
        }
    }
    //This method is INTENDED TO MAKE CHUNK AT EDITOR, EXTERAMLY SLOW AT IN GAME
    public void GenerateChunksAtMain(Vector3 center)
    {
        if (marchingCubeChunkDictionary == null)
        {
            marchingCubeChunkDictionary = new Dictionary <Vector3, GameObject>();
        }

        int xOffset = (int)center.x;
        int zOffset = (int)center.z;

        for (int x = -(int)chunkSetting.chunkRenderNumber.x; x <= (int)chunkSetting.chunkRenderNumber.x; x++)
        {
            for (int y = -(int)chunkSetting.chunkRenderNumber.y; y <= (int)chunkSetting.chunkRenderNumber.y; y++)
            {
                for (int z = -(int)chunkSetting.chunkRenderNumber.z; z <= (int)chunkSetting.chunkRenderNumber.z; z++)
                {
                    float   meshDistance = chunkSetting.distanceBetweenVertex * (chunkSetting.numberOfVerticesPerLine);
                    Vector3 offset       = new Vector3(0, 0, 0);
                    offset.x = Mathf.RoundToInt(center.x / meshDistance) * meshDistance;
                    offset.y = 0;
                    offset.z = Mathf.RoundToInt(center.z / meshDistance) * meshDistance;
                    Vector3 centerOfMarchingCube = new Vector3(x, y, z) * meshDistance + offset;
                    if (!marchingCubeChunkDictionary.ContainsKey(centerOfMarchingCube))
                    {
                        GameObject marchingCubeParentObject = GenerateChunkObject(centerOfMarchingCube);
                        marchingCubeChunkDictionary.Add(centerOfMarchingCube, marchingCubeParentObject);

                        //Make mesh without threading
                        MeshData meshData = new MeshData();
                        meshData.terrainObject = marchingCubeParentObject;

                        meshData.cubes     = MarchingCubeChunk.InitVertices(centerOfMarchingCube, chunkSetting, noiseSetting);
                        meshData.vertices  = MarchingCubeChunk.GenerateVertices(meshData.cubes);
                        meshData.triangles = MarchingCubeChunk.GenerateTriangles(meshData.vertices);
                        Mesh mesh = new Mesh
                        {
                            vertices  = meshData.vertices,
                            triangles = meshData.triangles
                        };
                        mesh.SetUVs(2, biomeSetting.GenerateUVS(chunkSetting, meshData.vertices));
                        mesh.RecalculateNormals();
                        meshData.terrainObject.GetComponent <MeshCollider>().sharedMesh = mesh;
                        meshData.terrainObject.GetComponent <MeshFilter>().sharedMesh   = mesh;
                    }
                }
            }
        }
    }