3D Tilemap in Unity

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi i'm going to show you how to use the tile map in unity for 3d games to start i have a mostly empty 3d project i've created a plain object with a blue material to look somewhat like water and i added a new models folder with some free models from kenny's game assets you can download them as well in the link in the description first thing we need are the tile map packages from the package manager go to window package manager then go to the gear icon next to the search click advanced project settings and click enable preview packages now go to this drop down and change in project the unity registry now we can see all the packages available to us not just those that are already in the project search for tile and you'll see 2d tile map editor which lets us create tile maps and edit them and then 2d timelap extras which has extra brushes and tiles that we could use in particular we are going to use the gameobject brush install both of these packages once the packages have installed close the window go to the hierarchy and right-click let's create a new tile map under 2d object tile map rectangular first thing you'll notice is that this tile map is in the x y direction like you'd expect in a 2d game to change that click on your grid and go to cell swizzle and change it from x y z to x z y now it's on the ground plane of your 3d scene now open the tile palette and dock it in your editor since we're dealing with 3d objects we can't use the default brush which uses 2d tiles instead we'll switch the brush to game object this lets us set it to any game object we want by opening up the cells and the first element this field game object is what decides what gets painted so to start i'll move this block object over to the game object field and i'll look at the ground in the scene click on the brush icon and then you can paint you can also erase like you normally would by switching to the eraser now if we want to put stuff on top of these tiles i usually make a new layer for every level so let me rename this first tile map into ground one and i'll create another tile map for anything above ground i'll name it ground two so for instance if i want to draw flowers on my ground i'll switch this game object to be the flower and then i'll change the offset so it's above ground now i'll make sure that i have the ground two tile map selected and now i'll paint on top of the ground i can do the same with trees and rocks and that's it now you can make tilemaps using 3d objects in unity it's pretty quick to get going though a lot of features are missing compared to 2d objects hopefully in the future unity will expand their functionality so it fully supports 3d thank you for watching
Info
Channel: Vector Bread
Views: 133,458
Rating: undefined out of 5
Keywords: gamedev, unity, 3d, tilemap, tutorial
Id: ulFc6p3hQzQ
Channel Id: undefined
Length: 3min 54sec (234 seconds)
Published: Sun Apr 04 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.