[Script Info] Title: [Events] Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text Dialogue: 0,0:00:00.00,0:00:04.99,Default,,0000,0000,0000,,2D Tilemap is a powerful tool that provides you with a simple way to create Dialogue: 0,0:00:05.02,0:00:08.29,Default,,0000,0000,0000,,2-dimentional environments, based on the grid layout. Dialogue: 0,0:00:08.91,0:00:12.65,Default,,0000,0000,0000,,In 2018.3, Unity is adding support Dialogue: 0,0:00:12.65,0:00:14.14,Default,,0000,0000,0000,,for a new type of grid Dialogue: 0,0:00:14.21,0:00:16.95,Default,,0000,0000,0000,,which will allow you to make isometric levels Dialogue: 0,0:00:16.95,0:00:19.10,Default,,0000,0000,0000,,the like of which can be seen in: Dialogue: 0,0:00:19.10,0:00:20.69,Default,,0000,0000,0000,,Pillars of Eternity Dialogue: 0,0:00:20.69,0:00:22.24,Default,,0000,0000,0000,,The Banner Saga Dialogue: 0,0:00:22.58,0:00:25.49,Default,,0000,0000,0000,,Shadowrun, and many more. Dialogue: 0,0:00:26.32,0:00:29.04,Default,,0000,0000,0000,,In addition, since 2018.2, Dialogue: 0,0:00:29.60,0:00:31.94,Default,,0000,0000,0000,,Unity also support hexagonal grids Dialogue: 0,0:00:32.26,0:00:34.62,Default,,0000,0000,0000,,which are commonly encountered in strategies, Dialogue: 0,0:00:34.62,0:00:36.47,Default,,0000,0000,0000,,and other turn-based games. Dialogue: 0,0:00:37.64,0:00:39.86,Default,,0000,0000,0000,,In this video, you will learn how to setup Dialogue: 0,0:00:39.86,0:00:42.66,Default,,0000,0000,0000,,the new isometric and hexagonal tilemaps, Dialogue: 0,0:00:43.09,0:00:45.09,Default,,0000,0000,0000,,as well as all the essential workflows Dialogue: 0,0:00:45.09,0:00:46.73,Default,,0000,0000,0000,,that will help you get started. Dialogue: 0,0:00:47.81,0:00:51.08,Default,,0000,0000,0000,,Be sure to check out the demo project\Nin the video description, Dialogue: 0,0:00:51.26,0:00:54.74,Default,,0000,0000,0000,,if you'd like to use the demonstrated assets yourself Dialogue: 0,0:00:55.33,0:00:59.62,Default,,0000,0000,0000,,Tilemap has been a part of the editor since 2017.2 Dialogue: 0,0:00:59.91,0:01:03.59,Default,,0000,0000,0000,,and doesn't require any additional package downloads to work. Dialogue: 0,0:01:04.12,0:01:06.05,Default,,0000,0000,0000,,To use the new tilemap grids, Dialogue: 0,0:01:06.05,0:01:07.31,Default,,0000,0000,0000,,you just need to make sure Dialogue: 0,0:01:07.31,0:01:09.72,Default,,0000,0000,0000,,that you are on the right version of Unity. Dialogue: 0,0:01:10.23,0:01:14.77,Default,,0000,0000,0000,,You are going to need 2018.2 or higher for hex tilemaps. Dialogue: 0,0:01:15.27,0:01:19.18,Default,,0000,0000,0000,,And 2018.3 onwards for isometric。 Dialogue: 0,0:01:20.20,0:01:24.49,Default,,0000,0000,0000,,Tilemap consists of several components working together. Dialogue: 0,0:01:24.89,0:01:27.27,Default,,0000,0000,0000,,First we have a grid GameObject. Dialogue: 0,0:01:27.81,0:01:30.58,Default,,0000,0000,0000,,This create your chosen grid type in the scene Dialogue: 0,0:01:30.58,0:01:33.84,Default,,0000,0000,0000,,and gives you further options to customize its parameters, Dialogue: 0,0:01:33.84,0:01:35.26,Default,,0000,0000,0000,,such as the cell size. Dialogue: 0,0:01:38.25,0:01:42.47,Default,,0000,0000,0000,,We can then attach one or more tilemap game objects to our grid. Dialogue: 0,0:01:43.12,0:01:44.50,Default,,0000,0000,0000,,Once we have a tilemap, Dialogue: 0,0:01:44.50,0:01:48.20,Default,,0000,0000,0000,,we need to create a palette which will hold our tile assets. Dialogue: 0,0:01:48.93,0:01:50.91,Default,,0000,0000,0000,,You can access the tile palette menu Dialogue: 0,0:01:50.91,0:01:54.26,Default,,0000,0000,0000,,from Window -> 2D -> Tile Palette Dialogue: 0,0:01:55.12,0:01:57.43,Default,,0000,0000,0000,,From here, you can create new palettes Dialogue: 0,0:01:57.43,0:02:00.16,Default,,0000,0000,0000,,corresponding to each of the different grid types. Dialogue: 0,0:02:00.16,0:02:01.79,Default,,0000,0000,0000,,You can add tiles to a palette Dialogue: 0,0:02:01.79,0:02:05.70,Default,,0000,0000,0000,,by simply dragging the sprites from the Project Window onto the palette. Dialogue: 0,0:02:06.74,0:02:08.29,Default,,0000,0000,0000,,Once you have a tile ready, Dialogue: 0,0:02:08.29,0:02:10.22,Default,,0000,0000,0000,,select it with the brush tool, Dialogue: 0,0:02:10.48,0:02:13.42,Default,,0000,0000,0000,,and choose the tile map game object you wish to paint on. Dialogue: 0,0:02:14.36,0:02:16.20,Default,,0000,0000,0000,,If you go back to the scene view, Dialogue: 0,0:02:16.20,0:02:19.28,Default,,0000,0000,0000,,you will now be able to start painting with your tile. Dialogue: 0,0:02:20.68,0:02:25.50,Default,,0000,0000,0000,,Your isometric or hexagonal grid can hold more than one tilemap. Dialogue: 0,0:02:27.11,0:02:31.49,Default,,0000,0000,0000,,You can use this to place some decorative objects on top of your tiles. Dialogue: 0,0:02:31.76,0:02:35.12,Default,,0000,0000,0000,,Or to create elevation levels and buildings. Dialogue: 0,0:02:35.81,0:02:38.65,Default,,0000,0000,0000,,You can change the sort order of the new tilemap, Dialogue: 0,0:02:38.65,0:02:41.22,Default,,0000,0000,0000,,so that it renders on top of the previous one. Dialogue: 0,0:02:41.47,0:02:43.78,Default,,0000,0000,0000,,You can also change the tile anchor setting, Dialogue: 0,0:02:43.78,0:02:47.18,Default,,0000,0000,0000,,to place your tiles on the higher point relative to the grid. Dialogue: 0,0:02:47.95,0:02:53.22,Default,,0000,0000,0000,,If you're using isometric tiles, you could also use a Z as Y tilemap, Dialogue: 0,0:02:53.22,0:02:58.02,Default,,0000,0000,0000,,and create elevation by simply changing the Z position of the tiles. Dialogue: 0,0:02:58.48,0:03:02.60,Default,,0000,0000,0000,,There's an example available on the 2d tech demos repository, Dialogue: 0,0:03:02.72,0:03:04.48,Default,,0000,0000,0000,,where you will find a scripted brush Dialogue: 0,0:03:04.48,0:03:07.96,Default,,0000,0000,0000,,that lets you adjust the set value dynamically as you paint. Dialogue: 0,0:03:08.29,0:03:12.26,Default,,0000,0000,0000,,You can find a link to the repository down in the video description. Dialogue: 0,0:03:13.36,0:03:17.77,Default,,0000,0000,0000,,At some point you will likely want to add collision to your tiles. Dialogue: 0,0:03:18.37,0:03:22.31,Default,,0000,0000,0000,,For this purpose you can use a Tilemap Collider 2D component, Dialogue: 0,0:03:22.61,0:03:27.22,Default,,0000,0000,0000,,which will automatically generate collision shapes for each individual tile. Dialogue: 0,0:03:28.27,0:03:30.06,Default,,0000,0000,0000,,In the tile asset settings, Dialogue: 0,0:03:30.06,0:03:33.64,Default,,0000,0000,0000,,you can adjust the type of physics shape each tile has. Dialogue: 0,0:03:33.68,0:03:38.83,Default,,0000,0000,0000,,You can change the collider to be either sprite based or grid based. Dialogue: 0,0:03:39.29,0:03:41.23,Default,,0000,0000,0000,,If your tile has a grid Collider, Dialogue: 0,0:03:41.23,0:03:44.69,Default,,0000,0000,0000,,its collision shape will match exactly with the shape of the grid cell Dialogue: 0,0:03:44.69,0:03:46.31,Default,,0000,0000,0000,,it is attached to Dialogue: 0,0:03:46.99,0:03:51.01,Default,,0000,0000,0000,,With a Sprite Collider you can add a custom physics shape to your tiles Dialogue: 0,0:03:51.01,0:03:52.94,Default,,0000,0000,0000,,by using the sprite editor. Dialogue: 0,0:03:53.45,0:03:55.49,Default,,0000,0000,0000,,Once you have a tilemap collider, Dialogue: 0,0:03:55.49,0:03:58.22,Default,,0000,0000,0000,,you might wish to merge the individual shapes into one Dialogue: 0,0:03:58.22,0:04:00.74,Default,,0000,0000,0000,,by using a Composite Collider 2D Dialogue: 0,0:04:01.87,0:04:07.60,Default,,0000,0000,0000,,As you can see tilemap offers a simple and fast\Nsolution to creating physics shapes. Dialogue: 0,0:04:08.50,0:04:11.11,Default,,0000,0000,0000,,If you have characters in your top-down\Ngame, Dialogue: 0,0:04:11.11,0:04:13.48,Default,,0000,0000,0000,,you will most likely want them to be able to Dialogue: 0,0:04:13.48,0:04:16.47,Default,,0000,0000,0000,,go behind and in front of objects on your level. Dialogue: 0,0:04:17.04,0:04:17.91,Default,,0000,0000,0000,,In this case Dialogue: 0,0:04:17.91,0:04:21.27,Default,,0000,0000,0000,,be sure to set the sort mode on the tilemap with your objects Dialogue: 0,0:04:21.27,0:04:22.68,Default,,0000,0000,0000,,to "Individual". Dialogue: 0,0:04:23.53,0:04:27.60,Default,,0000,0000,0000,,Now if your character sort order is the same as that of the tile map Dialogue: 0,0:04:28.04,0:04:31.69,Default,,0000,0000,0000,,it will appear to go behind and in front of the tiles on that tile map Dialogue: 0,0:04:32.39,0:04:35.09,Default,,0000,0000,0000,,You could adjust the sort order dynamically Dialogue: 0,0:04:35.09,0:04:38.51,Default,,0000,0000,0000,,to move the character to higher or lower elevation levels Dialogue: 0,0:04:39.47,0:04:42.54,Default,,0000,0000,0000,,If you want to speed up your world building with tilemap, Dialogue: 0,0:04:42.54,0:04:45.50,Default,,0000,0000,0000,,you can use Rule Tiles to extend your tile presets. Dialogue: 0,0:04:46.63,0:04:51.18,Default,,0000,0000,0000,,For example, you could make it so that when you're painting a certain type of terrain, Dialogue: 0,0:04:51.18,0:04:54.87,Default,,0000,0000,0000,,the correctly oriented tiles are chosen automatically for you. Dialogue: 0,0:04:55.47,0:04:59.12,Default,,0000,0000,0000,,You could also randomize different variations of the same tile. Dialogue: 0,0:04:59.78,0:05:04.94,Default,,0000,0000,0000,,Rule Tiles can save you a great amount of time in creating complex 2d environments. Dialogue: 0,0:05:05.64,0:05:09.56,Default,,0000,0000,0000,,The new hexagonal and isometric Rule Tiles are now available Dialogue: 0,0:05:09.56,0:05:12.15,Default,,0000,0000,0000,,on the 2d tech demos repository. Dialogue: 0,0:05:12.45,0:05:15.97,Default,,0000,0000,0000,,So feel free to go ahead and check them out for yourself. Dialogue: 0,0:05:17.16,0:05:21.65,Default,,0000,0000,0000,,Of course you're also able to extend tilemap with your own tile types. Dialogue: 0,0:05:22.16,0:05:25.21,Default,,0000,0000,0000,,Take a look at the featured documentation to learn more Dialogue: 0,0:05:25.51,0:05:30.47,Default,,0000,0000,0000,,Hopefully, this video has taught you some useful workflows for the new types of tilemap. Dialogue: 0,0:05:30.92,0:05:32.64,Default,,0000,0000,0000,,There's a lot more you can do, Dialogue: 0,0:05:32.64,0:05:35.03,Default,,0000,0000,0000,,but these basics will be a good starting point Dialogue: 0,0:05:35.03,0:05:36.98,Default,,0000,0000,0000,,if you want to try them out yourself. Dialogue: 0,0:05:37.36,0:05:41.14,Default,,0000,0000,0000,,You may also want to check out some of our tilemap blog posts, Dialogue: 0,0:05:41.14,0:05:44.82,Default,,0000,0000,0000,,including the one on procedural generation by Ethan Bruins. Dialogue: 0,0:05:45.56,0:05:49.41,Default,,0000,0000,0000,,The assets used in this video are available down in the link below Dialogue: 0,0:05:49.41,0:05:52.17,Default,,0000,0000,0000,,and are free for you to use as you wish. Dialogue: 0,0:05:52.85,0:05:56.03,Default,,0000,0000,0000,,As always, we're looking forward to seeing all the awesome projects Dialogue: 0,0:05:56.03,0:05:59.01,Default,,0000,0000,0000,,that you will create using unity's new tools. Dialogue: 0,0:05:59.25,0:06:03.47,Default,,0000,0000,0000,,Please share your creations and feedback on the unity forum