/// <summary>
 /// Places objects randomly on a given chunk
 /// </summary>
 /// <param name="chunk"></param>
 public static void PlaceObjectsAtChunk(TerrainChunk chunk)
 {
     System.Random random = new System.Random(TerrainGeneration.instance.Seed + chunk.ChunkPosition.GetHashCode());
     for (int i = 0; i < instance.gameObjectLayers.Length; i++)
     {
         if (!instance.gameObjectLayers[i].Enabled || chunk.ChunkObjects[i].GameObjects.Count > 0)
         {
             continue;
         }
         for (int o = 0; o < instance.gameObjectLayers[i].NumberPerChunk; o++)
         {
             float xPos = MathUtility.GetRandomNumber(random, chunk.Position.x, chunk.Position.x + TerrainGeneration.instance.ChunkSize);
             float zPos = MathUtility.GetRandomNumber(random, chunk.Position.z, chunk.Position.z + TerrainGeneration.instance.ChunkSize);
             float yPos = TerrainGeneration.SampleHeightMapWorld(xPos, zPos);
             if (yPos >= instance.gameObjectLayers[i].MinHeight && yPos < instance.gameObjectLayers[i].MaxHeight)
             {
                 Vector3    newPosition  = new Vector3(xPos, yPos, zPos);
                 GameObject placedObject = instance.gameObjectLayers[i].ObjectsWaiting.Dequeue();
                 placedObject.transform.position = newPosition;
                 placedObject.SetActive(true);
                 chunk.ChunkObjects[i].GameObjects.Add(placedObject);
             }
         }
     }
 }