- Home /
Create prefab with tilemap
Hello! I'm developing a 2d platform side scroller game using prefab made with tiles placed next to each other (for example, one prefab it's a piece of ground, one waterfall etc...). In Unity 2017.2 I see that there is the Tilemap feature where you create a grid and then "paint" it with tiles from the palette. But it is possible to create prefab using the Tilemap? I think it could be a very quick way to create prefabs...
Thanks in advance to everyone.
Answer by Ymrasu · Dec 11, 2017 at 12:26 AM
Yes, this is done in your Tile Palette, you would hit the Edit button and paint inside your palette like you do on your tilemap. You have to be careful with the tools you have selected though, be sure click the eyedropper tool to select the tiles you want to paint when in edit mode, otherwise you'll just paint over them, instead of selecting them to paint with.
Then you can just use the eyedropper over your whole 'prefab' to paint on your tilemap. (Click and drag with the blue border bounding box)
Thanks, it's a good idea... but my original idea was to create the side scroller game as a infinity runner game, so I need to save every prefab that i create to instantiate it randomly each time it is necessary. Is it possible to do that?
Thanks for you suggest