Okay everyone, I have a problem.
I am making a Map Editor for my 2D game.
Basically I have a "Slot" object, and it contains a "Tile" object (which belongs to slot and has a Texture). I have 2 Types of slots:
Type is Pen Slots, when you press them and form pops up which you use to load an image for a tile anywhere on the computer. Last clicked tile is an active tile.
Type is Map tile. They are 32x32 slots that are stacked next to each other an make it look like a map. When you have a pen and you clicked on it so its active, you can draw a map then, it copies pen slot texture to map texture.
Now I managed to save my map to a text file (for each tile -> Path.GetFileNameWithoutExtenson -> save map.txt). And I can load a text file to get saved names, BUT I DONT KNOW WHAT TO DO WITH TEXTURES, should I:
1. I would be using this Editor for my game, so I could put all my textures from the game inside some folder in Map Editor project, same textures same names that could work.
2. ????
Could anyone reccomend me if they can think of another way to load textures into Map slots ?
EDIT:
Lets say I have a 3 x 3 map and 3 textures as tiles:
sky sky sky sky grass sky dirt grass dirt
also texture names are also sky, grass and dirt, so its easy to store texture names in variables/array whatever when loading a map. But what about textures? What do I do with the images.
Lets say I use my map editor for 10 different games, I save a map as a map.txt file with texture names. I restart map editor and I want to load the map, it can load text given data fine, but what about images, how do I pass tiles from map editor to game