private void InstantiateChunks(TERRAIN.ETerrain[,] _startTerrain)
    {
        terrainChunks       = new TerrainChunk[terrainDimension, terrainDimension];
        terrainChunkStorage = new MeshList <TerrainChunk>();
        int halfDim = GetTerrainDimCenter();

        for (int x = 0; x < terrainDimension; x++)
        {
            for (int z = 0; z < terrainDimension; z++)
            {
                terrainChunks[x, z] = new TerrainChunk(_startTerrain[x, z],
                                                       new Vector3(planetData.GetTerrainSize().x *(x - halfDim), 0, planetData.GetTerrainSize().y *(z - halfDim)) + currentCenter,
                                                       planetData.GetTerrainSize(),
                                                       this);
            }
        }



        terrainChunkStorage.SetCenter(terrainChunks[halfDim, halfDim]);
        //first do the middle line
        for (int x = 0; x < halfDim; x++)
        {
            terrainChunkStorage.AddLeft(-x, 0, terrainChunks[halfDim - x - 1, halfDim]);
            terrainChunkStorage.AddRight(x, 0, terrainChunks[halfDim + x + 1, halfDim]);
        }

        //the in parallel always do the line above and below in one set
        for (int y = 0; y < halfDim; y++)
        {
            terrainChunkStorage.AddAbove(0, y, terrainChunks[halfDim, halfDim + y + 1]);
            terrainChunkStorage.AddBelow(0, -y, terrainChunks[halfDim, halfDim - y - 1]);

            for (int x = 0; x < halfDim; x++)
            {
                terrainChunkStorage.AddLeft(-x, y + 1, terrainChunks[halfDim - x - 1, halfDim + y + 1]);
                terrainChunkStorage.AddRight(x, y + 1, terrainChunks[halfDim + x + 1, halfDim + y + 1]);
            }
            for (int x = 0; x < halfDim; x++)
            {
                terrainChunkStorage.AddLeft(-x, -(y + 1), terrainChunks[halfDim - x - 1, halfDim - y - 1]);
                terrainChunkStorage.AddRight(x, -(y + 1), terrainChunks[halfDim + x + 1, halfDim - y - 1]);
            }
        }

        ReloadChunkArrayFromStorage();

        currentStoragePosition = new Vector2Int(0, 0);
    }