- Home /
2d Tile System And Map
I would like to make a map made of many tiles. I know how to make the map just not how to seperate it into tiles. Thankyou in advance (im fairly new to programming in general :))
Answer by robertbu · Oct 04, 2014 at 10:07 PM
There are multiple different ways to do what you ask, and which one is ‘best’ will depend on the specifics of the game. Some of the choices:
Cut up the texture in your image editing and build individual game objects
Cut up the texture in your image editing program, create a prefab with the array of textures, and then dynamically create the individual objects and set the image.
Use the Spites and the sprite editor to create the individual rectangles
Build a mesh with the right number of quads and uv map the texture on the mesh
Create a prefab out of a quad and a material with the whole image. Use the Material.mainTextureScale and Material.mainTextureOffset to set each.
And I’m sure there are more. If you get your questions down to one specific approach and have issues, we welcome your new question. Generally we refer design questions to Unity Forums. Unity Answers addresses single, specific technical questions.