/// <summary>
		/// Parse tiles layer.
		/// </summary>
		/// <param name="tilesedIdx">The corresponding tileset index.</param>
		void ParseTileLayer(int tilesedIdx)
		{
			/**
			 * THIRD, we need to set which tileset we should use to retrieve information about tiles/objects in the map.
			 * 
			 * In the generated JSON map from Tiled, we have a matrix that represents "what are" in the scenario. Each
			 * "thing" in the scenario have a unique ID. But this ID is binded to a specific tileset. We need to identify
			 * which tileset is used in which layer so we can retrieve the correct properties for each tile/object.
			 */
			TiledMapParser.SetupCurrentTileset(tilesedIdx);

			// Retrieve node properties.
			for (int tilePosY = 0; tilePosY < mapHeight; tilePosY++) {
				for (int tilePosX = 0; tilePosX < mapWidth; tilePosX++) {

					// Find out the tile ID.
					int tileCount = (tilePosY * mapWidth) + tilePosX;
					int tileID = TiledMapParser.GetTileID(tileCount) - 1; // 0 is reserved for empty tiles and doesn't appear in the layers data.

					// Check and process the Moveable Property (custom property. Informs if a character can walk over the tile).
					if (TiledMapParser.TileHasProperty(tileID, moveableProperty)) {
						// If the property was found for this tile, retrieve it!
						moveableTilesMatrix[tilePosX, tilePosY] = TiledMapParser.GetTileBoolProperty(tileID, moveableProperty);
					}

					// Check and process the Moveable Property (custom property. Informs the tile's weight).
					if (TiledMapParser.TileHasProperty(tileID, weightProperty)) {
						tilesWeightMatrix[tilePosX, tilePosY] = TiledMapParser.GetTileIntProperty(tileID, weightProperty);
					}
				}
			}
		}
		/// <summary>
		/// Parse objects from the map.
		/// </summary>
		/// <param name="tilesedIdx">The corresponding tileset index.</param>
		public void ParseObjects(int tilesedIdx)
		{
			/**
			 * Set tileset index for this layer.
			 */
			TiledMapParser.SetupCurrentTileset(tilesedIdx);

			// Assert layer name.
			Assert.AreEqual<string>("ObjectsLayer", TiledMapParser.GetLayerName());

			// "objects" is also a special layer from tile that we can create to spawn objects.
			int objCount = TiledMapParser.GetLayerObjectsCount();
			for (int objIdx = 0; objIdx < objCount; objIdx++) {

				/**
				 * WHILE parsing objects, we have the object index in our JSON data file, but we must find the corresponding
				 * tileset identifier for the object in order to retrieve its properties.
				 */
				int tileID = TiledMapParser.GetLayerObjectTileID(objIdx);

				// Some shared properties provided by Tiled.
				int objRot = TiledMapParser.GetObjectRotation(objIdx);

				// FindObjectRealX/Y allows to find the corresponding X and Y position of the object in the Unity coordinates.
				// The object is put in the center of the tile.
				int objPosX = TiledMapParser.FindObjectRealX(objIdx, mapWidth, tileWidth);
				int objPosY = TiledMapParser.FindObjectRealY(objIdx, mapWidth, tileWidth);
				
				Debug.Log("Spawn: " + tileID + " pos X: " + objPosX + " - pos Y: " + objPosY + " - obj rot: " + objRot);

				/** This is very specific stuff. I want to show two things here:
				 * 
				 * Here, we can parse a string property directly as an Enumerator.
				 * 
				 * ObjectType objType = (ObjectType)Enum.Parse(typeof(ObjectType), TiledMapParser.GetTileStringProperty(tileID, ObjectTypeProperty));
				 */

				 /** Here, we are retrieving a unique property from the object. This property does NOT come from the tileset, but from object's data.
				 * Unique properties are set directly in the object in the map. It's useful to set custom properties for each object (as the kind of
				 * items a chest will drop when opened).
				 * 
				 */ int objAmount = TiledMapParser.GetObjectIntUniqueProperty(objIdx, "Amount");
				Debug.Log("Object amount: " + objAmount);
			}

			Debug.Log("Total parsed objects: " + objCount);
		}