private void InstantiatePlacedObject(Vector2 worldPosition, IPlacedObject objectToPlace, bool cloneObject, ILevelElement levelElement = null)
    {
        IPlacedObject placedObject;

        if (cloneObject)
        {
            placedObject = CloneObjectToPlace(objectToPlace);
            ((PlacedObject)placedObject).transform.position = worldPosition;
        }
        else
        {
            placedObject = objectToPlace;
        }

        if (placedObject.Type == PrefabType.LEVELELEMENT)
        {
            //objectDeletionModule.RemoveWallFromTileMap(placedObject);
            Destroy(placedObject.Prefab);
            if (levelElement == null)
            {
                levelElement = CreateLevelElement(placedObject);
            }

            placedObject.Prefab = AssignLevelElementToPlacedObject(levelElement);
            AddWallToTileMap(placedObject.Prefab);

            DestroyeWallSpriteComponent(placedObject);
            AddSpriteRendererForWall(placedObject);

            levelDataManager.AddLevelElement(levelElement);
            bool outerBoundWall = objectInformationModule.CheckForOuterBoundWall(placedObject);
            if (outerBoundWall)
            {
                placedObject.SetProtectedObject(true);
            }
        }

        if (objectToPlace.Type is PrefabType.PLAYER)
        {
            objectInformationModule.SetPlayerExists(true);
        }

        IList <ILevelTile> levelTiles = GetLevelTiles(placedObject, worldPosition, levelElement);

        placedObject.SetupInstantiatedObject(levelTiles, transform);
        LevelCreator.GetInstance().GetInScenePlacedObjects()[placedObject.ObjectId] = placedObject;
    }
    private void FillTilesWithFloor()
    {
        Vector2Int levelSize = level.GetLevelSize();

        for (int x = 0; x < levelSize.x; ++x)
        {
            for (int y = 0; y < levelSize.y; ++y)
            {
                Vector2Int pos  = new Vector2Int(x, y);
                ILevelTile tile = level.GetTileAtPos(pos);

                FloorData floorData = new FloorData(pos);

                ILevelElement floor = LevelElementFactory.InstantiateLevelElement(floorData, transform);
                levelDataManager.AddLevelElement(floor);
            }
        }
    }