public void CreateTerrainData_Simple(int[] cubeData)
        {
            Vector3 gridLocToPlace = new Vector3(cubeData [0], cubeData [1], cubeData [2]);

            // if any cubes already exist at this location, return
            if (_GridManager.GridLocToGridObjLookup [gridLocToPlace] != null)
            {
                return;
            }

            if (cubeData [3] == 1)
            {
                TerrainData_Simple newData = ScriptableObject.CreateInstance <TerrainData_Simple> ();

                newData.gridLocX = (int)gridLocToPlace.x;
                newData.gridLocZ = (int)gridLocToPlace.y;
                newData.gridLocY = (int)gridLocToPlace.z;

                newData.surface = cubeData [3];

                _GridManager.GridLocToGridObjLookup.Add(gridLocToPlace, newData);
            }
        }
        // Go through and randomly remove cubes to give the terrain natural crevases and caves
        public void RemoveDataDensity()
        {
            // Temporary list to put cubes in that need to be deleted
            List <Vector3> dataToRemoveList = new List <Vector3>();

            int numMapPiecesXZ = _mapSettings.numMapPiecesXZ;
            int numMapPiecesY  = _mapSettings.numMapPiecesY;
            int totalXZCubes   = _mapSettings.totalXZCubes;
            int totalYCubes    = _mapSettings.totalYCubes;

            int holeCount = (numMapPiecesXZ * numMapPiecesXZ) * numMapPiecesY;

            for (int i = 0; i < holeCount; i++)
            {
                int locX = (Random.Range(0, totalXZCubes));
                int locZ = (Random.Range(0, totalXZCubes));
                int locY = (Random.Range(0, totalYCubes));

                Vector3 dataLoc = new Vector3(locX, locZ, locY);

                int spread = Random.Range(2, 4);

                int startX = (int)dataLoc.x - spread;
                int startZ = (int)dataLoc.y - spread;
                int startY = (int)dataLoc.z - spread;

                int finishX = (int)dataLoc.x + spread;
                int finishZ = (int)dataLoc.y + spread;
                int finishY = (int)dataLoc.z + spread;


                int randomHoleShape = Random.Range(0, 2);


                for (int y = startY; y <= finishY; y++)
                {
                    if (y == startY || y == finishY)
                    {
                        if (randomHoleShape == 0)
                        {
                            // Round shape
                            startZ  = startZ + 1;
                            finishZ = finishZ - 1;
                            startX  = startX + 1;
                            finishX = finishX - 1;
                        }
                        else if (randomHoleShape == 1)
                        {
                            // diagonal shape
                            startZ  = startZ - 1;
                            finishZ = finishZ - 1;
                            startX  = startX - 1;
                            finishX = finishX - 1;
                        }
                    }
                    else
                    {
                        startZ  = (int)dataLoc.y - spread;
                        finishZ = (int)dataLoc.y + spread;
                        startX  = (int)dataLoc.x - spread;
                        finishX = (int)dataLoc.x + spread;
                    }

                    for (int z = startZ; z <= finishZ; z++)
                    {
                        for (int x = startX; x <= finishX; x++)
                        {
                            // dont remove bottom layer cubes
                            if (y != 0)
                            {
                                Vector3 dataToRemoveLoc = new Vector3(x, z, y);
                                if (_GridManager.GridLocToGridObjLookup [dataToRemoveLoc] != null)
                                {
                                    TerrainData_Simple dataSimple = (TerrainData_Simple)_GridManager.GridLocToGridObjLookup [dataToRemoveLoc];

                                    if (z == startZ || z == finishZ || x == startX || x == finishX || y == startY || y == finishY)
                                    {
                                        dataSimple.surface = 1;
                                    }
                                    else
                                    {
                                        dataToRemoveList.Add(dataToRemoveLoc);
                                    }
                                }
                            }
                        }
                    }
                }
            }

            Debug.Log("Hole.count: " + holeCount);

            foreach (Vector3 dataLoc in dataToRemoveList)
            {
                RemoveDataFromWorld(dataLoc);
            }
            dataToRemoveList.Clear();
        }