Don't make grids without knowing THIS in Unity

Utilizing this component dramatically simplifies the task of designing a grid. By defining the parameters such as tile size, gap, and type within the Grid Component, it automatically computes world positions based on the specified grid indices.
This reduces the complexity of placement, ensuring an efficient and streamlined grid creation process. Thanks GPT, lol :)
Source: gist.github.com/Matthew-J-Spe...
❤️ Become a Tarobro on Patreon: / tarodev
=========
🔔 SUBSCRIBE: bit.ly/3eqG1Z6
🗨️ DISCORD: / discord
✅ MORE TUTORIALS: / tarodev

Пікірлер: 172

  • @datablob
    @datablob11 ай бұрын

    Grid component: attached. Power: harnessed. Tarochan: returned. Hope: restored.

  • @Tarodev

    @Tarodev

    11 ай бұрын

    See you in 3 months

  • @misterlonely6057

    @misterlonely6057

    11 ай бұрын

    Hotel: Trivago?

  • @captainnoyaux

    @captainnoyaux

    11 ай бұрын

    meme: succeeded like: engaged

  • @jimmyjohnjoe3700

    @jimmyjohnjoe3700

    11 ай бұрын

    @@Tarodevbye, have a good life

  • @Paul-zh2jp

    @Paul-zh2jp

    11 ай бұрын

    tarochan AYAYA

  • @rishavnathpati
    @rishavnathpati11 ай бұрын

    This is the most productive 1 min of my life

  • @Star_Wars_Galaxy
    @Star_Wars_Galaxy11 ай бұрын

    I was literally just about to start a project with a grid so this is super useful and well timed. Thanks!

  • @LivanderGamedev
    @LivanderGamedev11 ай бұрын

    been waiting for your new tutor content and fortunately this grid tutorial is related to 1 of my projects, thanks :)

  • @krastyo9825
    @krastyo982511 ай бұрын

    I just found you recently and you have saved me so much headache it is insane. So many forum posts, videos, etc. give examples on how to do things but in such a quick and sloppy way that I keep having to spend extra time looking for extra optimizations. Honestly thank you so much for your videos they are amazing.

  • @NoTimeLeft_
    @NoTimeLeft_11 ай бұрын

    Someone hacked Tarodevs channel and uploaded a video. Someone should alert him! 😂

  • @vanivan5202

    @vanivan5202

    11 ай бұрын

    I fear the day when I will see Quaternions video. That's when I will now this channel is done 100%.

  • @NoTimeLeft_

    @NoTimeLeft_

    11 ай бұрын

    @@vanivan5202 his Magnus opus

  • @LunarSoul255

    @LunarSoul255

    11 ай бұрын

    @@vanivan5202 Oh Quaternions are easy, EASY! First you -#*%Q#, then you ??????, then you spiral into a state of insanity and self-loathing for a week or more, then boom! You know the magic behind Quaternions.

  • @mihast3273

    @mihast3273

    10 ай бұрын

    No! Whoever hacked the channel, thank you, this way very helpful

  • @AetherXIV
    @AetherXIV11 ай бұрын

    Tarodev your vids are little nuggets of gold. Thank you for all you've taught me.

  • @DavonAllen92
    @DavonAllen9210 ай бұрын

    I really appreciate this. I've been struggling with grids for a long time and have several projects that need it. This was by far the best way of handling it. and i also like that you went with the sprite renderer as 2d stuff gets overshadowed by UGUI layout stuff often.

  • @MrJotaFelipe
    @MrJotaFelipe11 ай бұрын

    Good to see you back! Thanks for the video!

  • @JBtheWARVillain
    @JBtheWARVillain11 ай бұрын

    Good to see you back and thanks for the share. Perfect timing!! Our next work project is going to feature a hex tile mechanic, and this is going to be a big help.

  • @Tarodev

    @Tarodev

    11 ай бұрын

    Good luck with your project 😊

  • @DocuFlow
    @DocuFlow10 ай бұрын

    Thanks mate, looking forward to the next one!

  • @DiegoCastares
    @DiegoCastares11 ай бұрын

    So happy to see you back! 🎉

  • @tomaslaaperi5849
    @tomaslaaperi58495 ай бұрын

    i love short and exact videos like these

  • @winston8589
    @winston858911 ай бұрын

    Please do more. I really love ur videos❤

  • @tskingtter-stepanyan5993
    @tskingtter-stepanyan599310 ай бұрын

    Thank you! So easy and in 1 min video! You're awesome!

  • @kevinscaglioni8020
    @kevinscaglioni802011 ай бұрын

    Another amazing video, thanks mate

  • @windwalkerrangerdm
    @windwalkerrangerdm11 ай бұрын

    Taro. I know it's a heavy burden. But we need you. As long as it doesn't compromise your mental well being, of course.

  • @Tarodev

    @Tarodev

    11 ай бұрын

    I'm here for you 🙏

  • @Nebulaoblivion
    @Nebulaoblivion11 ай бұрын

    every video is a banger tarodev.

  • @MIDGETPANCAKES
    @MIDGETPANCAKES11 ай бұрын

    This is amazing, I've been using the crappy prefab brush this whole time

  • @TheKr0ckeR
    @TheKr0ckeR11 ай бұрын

    I love that! Thank you man.

  • @NominativoUnivoco
    @NominativoUnivoco11 ай бұрын

    I literally checked yesterday if I had missed any new videos because it seemed like they haven't been out for too long 😂

  • @kubstoff1418
    @kubstoff141811 ай бұрын

    This is really useful! I'm still awaiting that quaternion tutorial :>

  • @ccoodduu
    @ccoodduu10 ай бұрын

    I would have liked to know this a year, hehe. Very informative video. Thank you!

  • @Tarodev

    @Tarodev

    10 ай бұрын

    You know it now 😊

  • @chizuru1999
    @chizuru199911 ай бұрын

    Finally you uploaded. Its a hope for developers like me who just started out with unity. 👌🤭

  • @Tarodev

    @Tarodev

    11 ай бұрын

    I wish you luck on your journey

  • @winston8589
    @winston858911 ай бұрын

    Such a long time 🎉❤

  • @ImmortalTimothyM
    @ImmortalTimothyM11 ай бұрын

    I have actually been thinking a lot about the best ways to go about grids (particularly isometric and hexagon grids) so this video is useful. Though I can not seem to find the source code you mentioned.

  • @Tarodev

    @Tarodev

    11 ай бұрын

    Added :)

  • @ImmortalTimothyM

    @ImmortalTimothyM

    11 ай бұрын

    @@Tarodev Thanks!

  • @FistFullofShrimp
    @FistFullofShrimp11 ай бұрын

    Incredibly happy to see this post! You're the best Tarodev. Don't leave us so lonely out here bby!!! 🍤

  • @yaboishadowninja
    @yaboishadowninja11 ай бұрын

    So is this video basically saying you can make a grid without using tilemaps? That's awesome.

  • @albingrahn5576
    @albingrahn557610 ай бұрын

    didn't know this, thanks :)

  • @kbxv925
    @kbxv92511 ай бұрын

    hey welcome back!

  • @everythingguy8422
    @everythingguy842211 ай бұрын

    Thanks, Sensei.

  • @MoonGameDev
    @MoonGameDev10 ай бұрын

    Love your videos. I am about to binge from now to the weekend. Do you take suggestions? I haven't seen a good all around save & load video. I know different games have different requirements. But, would you be able to cover this topic? (Different Save & Load methods, Encryption, Local vs Cloud, etc)

  • @tictactoc9311
    @tictactoc931110 ай бұрын

    My fav unity channel

  • @Tarodev

    @Tarodev

    10 ай бұрын

    And you're my favourite subscriber

  • @frustratedj
    @frustratedj11 ай бұрын

    i frickin love you man

  • @yiou7892
    @yiou789210 ай бұрын

    i just found this channel. and i really like those viedos you made. they are very easy to understand. i dont know why you dont upload more new videos recently. it must be some reasons. but i hope i could see your new video soon.

  • @Tarodev

    @Tarodev

    10 ай бұрын

    I will start uploading again 😊

  • @felfurion8624
    @felfurion862411 ай бұрын

    I clicked this as soon as i saw the notification. A video from Tarodev is a joy. Is there a shader applied here or "just" 2D art?

  • @Tarodev

    @Tarodev

    11 ай бұрын

    Just my hand drawn tiles 😊

  • @Dardasha_Studios
    @Dardasha_Studios11 ай бұрын

    Thanks!!

  • @SUCACU
    @SUCACU10 ай бұрын

    I've had two projects where I wanted grid systems, they were 2D so I inherently used the TileMaps as a way to navigate the world, it was HELL, for anyone who ever wants to do moving things on a grid, DO NOT use the TileMap component. Glad I've seen this video, even if after the fact, it's a nice lesson for future dev.

  • @Tarodev

    @Tarodev

    10 ай бұрын

    I've been through the same process my man... I know your pain

  • @noodle-eater
    @noodle-eater11 ай бұрын

    Thanks a lot, as always your video gimme new knowledge, now I dont neet to DIY grid system

  • @LetsPlayCrazy
    @LetsPlayCrazy10 ай бұрын

    Ah yes. I totally know what these words meant! Thank you a lot for helping me out!

  • @knownas2017
    @knownas201710 ай бұрын

    me: I wanna make a grid based game KZread: look at this video

  • @nikolatasev4948
    @nikolatasev494810 ай бұрын

    Awesome!

  • @dreamisover9813
    @dreamisover981311 ай бұрын

    Yo, new Tarodev video dropped!

  • @zerohidz
    @zerohidz11 ай бұрын

    Where have you been Mr Taro? We miss your content

  • @Viski982
    @Viski98211 ай бұрын

    Man you're great

  • @KeyboardKrieger
    @KeyboardKrieger11 ай бұрын

    Wait, I always work with grids and never knew I could read out the tiles. I always make an Array on top of my tilemap

  • @orangepeals7210
    @orangepeals721010 ай бұрын

    I love your videos. Very useful and informative for someone who's just started like me... Maybe you have a tutorial like this that I missed, but do you have any tutorials on how to move characters on a grid in a limited way? Like in SRPGs where units have movement of 5 and can move 5 tiles? Right now my units just go wherever they please...

  • @Tarodev

    @Tarodev

    10 ай бұрын

    Checkout my old school grid series. You can use this technique in conjunction with that series

  • @gutzimmumdo4910
    @gutzimmumdo49108 ай бұрын

    can i get the vertex positions of an spesific tile if im using a grid or a tilemap?

  • @rootbindev
    @rootbindev11 ай бұрын

    You are the gridmaster

  • @restushlogic5794
    @restushlogic579411 ай бұрын

    Modular Quest System would be nice.

  • @DemsCreates
    @DemsCreates11 ай бұрын

    We're so back.

  • @blackcitadel9
    @blackcitadel910 ай бұрын

    oh nice. I was just researching how to deal with hex grids

  • @ibrahimokur4169
    @ibrahimokur416911 ай бұрын

    You are a god man thanks a lot

  • @rapaltiar
    @rapaltiar11 ай бұрын

    Welcome back

  • @Tarodev

    @Tarodev

    11 ай бұрын

    Thank you

  • @puddle.studios
    @puddle.studios11 ай бұрын

    this is a gamechanger

  • @Tarodev

    @Tarodev

    11 ай бұрын

    Agreed 😊 let's make some grid games

  • @filesstorage7854
    @filesstorage785411 ай бұрын

    i miss your videos man

  • @Rovsau
    @Rovsau11 ай бұрын

    Sweet. Thank you, friendly neighborhood cephalopod.

  • @dany3310
    @dany331010 ай бұрын

    Hi Tarodev, Very interesting. But, you made a video (game grid 1 & 2) where you made a grid from scratch, without the grid built-in component. When to use one method rather than the other? What method do you recommend for a tactical game ?

  • @Tarodev

    @Tarodev

    10 ай бұрын

    This can be used with those grid tutorials just fine. In those videos I used a simple nested for loop to gather world positions. Using this method you can continue using that nested for loop, but with the grid component you can transform those basic positions into whatever grid type you'd like 😊

  • @BLUGTheK
    @BLUGTheK11 ай бұрын

    Hope you doing well. See you again in the future

  • @ThatLucasGuy93
    @ThatLucasGuy932 ай бұрын

    Hey! Wonderful video. Would you mind explaining just a little more about how to get this set up from scratch for someone dangerously early in their Unity journey? I should be able to handle just a few sentences of text, just not quite seeing how to get from the blank 2D screen with the built in hexagonal tile map instantiated all the way to your final outcome here. Where does your script go? And do I need to be using Unity 3D to get those cool perspective shifts, etc?

  • @Tarodev

    @Tarodev

    2 ай бұрын

    Pop into my discord and mention this comment. I'll fill you in

  • @StratoCatster
    @StratoCatster11 ай бұрын

    I remember you and you awesome...❤

  • @Hazzel31337
    @Hazzel3133711 ай бұрын

    awsome

  • @HollowedEyeHounds
    @HollowedEyeHounds10 ай бұрын

    how would this work with vertical grid pieces?

  • @aleksandarprokopovic7497
    @aleksandarprokopovic749711 ай бұрын

    Is there a way to check if point is inside a cell gap?

  • @zbyszekkiebasa906
    @zbyszekkiebasa90611 ай бұрын

    You forgot to add GridTileBase to the repository

  • @larryd9577
    @larryd957710 ай бұрын

    king

  • @yufisjr
    @yufisjr11 ай бұрын

    We want more

  • @Tarodev

    @Tarodev

    11 ай бұрын

    Greedy!! But okay :)

  • @yufisjr

    @yufisjr

    11 ай бұрын

    I want more from my favorite channel. Dont be like Brackeys haha. Tell me if I can help, thanks :)

  • @littleowlgaming-unity-tutorial
    @littleowlgaming-unity-tutorial11 ай бұрын

    OH Grids, I LOVE grids! i havent even watched it it, and I already gave it a thumbs up.... ofcoarse, now I'm going into this with high expectations.... omg, if you let me down though. that thumbs up... it will have to change, ill be heart broken!

  • @littleowlgaming-unity-tutorial

    @littleowlgaming-unity-tutorial

    11 ай бұрын

    jaw dropped. the like stays, i tried to give 2 likes, and that backfired. so I had to give you 3. which is only actually one

  • @gauracappelletti3893
    @gauracappelletti389310 ай бұрын

    can someone explain why this is better than the other system

  • @monkeyseemonkeydo1
    @monkeyseemonkeydo111 ай бұрын

    Is there a framework that supports this kind of tiling feature in threejs?

  • @mikoulol
    @mikoulol6 ай бұрын

    Hi, really appreciate your work. But here I am completely lost... I don't understand where I need to make the link between this script and the Grid component. you said that we need to serializeReference to it... Is there somoene willing to give a little explanation ? Thanks a lot

  • @posidon114
    @posidon11410 ай бұрын

    How do you guarantee that the grid size will = the size of your prefab? Since you're not using the tilemap system and creating "tile" presets in my code the worldspace coordinates provided are off and the tiles are inside of each other even though the prefab is a size(1,1,1) same as the grid size. Am I missing something or just mistaken?

  • @Tarodev

    @Tarodev

    10 ай бұрын

    If your tiles are 1x1 they should fit the default 1x1 rectangle grid. Are your pixels per unit set correctly? Put your tile against a unity cube to see if they're equal

  • @posidon114

    @posidon114

    10 ай бұрын

    @@Tarodev Thanks for the answer, I think the problem is that I was trying to use a unity 3d prefab "cube" instead of sticking true to a 2d iso sprite. Messed up some math calculations so if I wanted to use the grid to place actual cube objects I would probably need to do a bit more verbose script logic. Thanks!

  • @Tarodev

    @Tarodev

    10 ай бұрын

    @@posidon114 good luck buddy

  • @Ricochetaglet
    @Ricochetaglet11 ай бұрын

    My God!! 😎

  • @mehmeh8883
    @mehmeh888311 ай бұрын

    👑

  • @AlexBlackfrost
    @AlexBlackfrost11 ай бұрын

    Every video is a step closer to the Quaternions video

  • @Tarodev

    @Tarodev

    11 ай бұрын

    Or further away

  • @AmfistomosAtlas
    @AmfistomosAtlas11 ай бұрын

    What about path finding? Do we also get that out of the box?

  • @Tarodev

    @Tarodev

    11 ай бұрын

    Nope! But luckily you can just use the grid indices (the original vector3int) in your pathing algorithm and do real time conversion when the unit moves 😊

  • @AGreatTsunami
    @AGreatTsunami11 ай бұрын

    It is ridiculous how LITTLE there is content on the native grid/tilemap system other than "HEY LOOK ITS A FANCY PENCIL"

  • @firstprimehunter
    @firstprimehunter10 ай бұрын

    Can you implement this feature in 3D? Like if you made levels out of blocks

  • @Tarodev

    @Tarodev

    10 ай бұрын

    Absolutely. Just convert the xy to xz 😊

  • @sergeygolovin9523
    @sergeygolovin952311 ай бұрын

    What needs to be coded to give player ability to select and drag individual grids?

  • @vanivan5202

    @vanivan5202

    11 ай бұрын

    Raycast the grid cell and modify it's transform to be position of a mouse.

  • @zbyszekkiebasa906
    @zbyszekkiebasa90611 ай бұрын

    Took a break to finish that Quaterions video I assume.

  • @Tarodev

    @Tarodev

    11 ай бұрын

    Oh yeah man, that's next

  • @janthegamedev
    @janthegamedev11 ай бұрын

    Important!!! You forgot to add GridTileBase to the repo.

  • @Tarodev

    @Tarodev

    11 ай бұрын

    Thanks! I fixed it up. It was actually just video-specific functionality.

  • @steviedev
    @steviedev11 ай бұрын

    wooooooooooh!!!!

  • @WhitefoxSpace
    @WhitefoxSpace11 ай бұрын

    Legit question Taro, are you busy working on any long term game projects atm?

  • @Tarodev

    @Tarodev

    11 ай бұрын

    I am... Video coming soon. All will be revealed 😊

  • @WhitefoxSpace

    @WhitefoxSpace

    11 ай бұрын

    @@Tarodev then your absence I expect has been related to this, good luck, looking forward to it

  • @WhitefoxSpace

    @WhitefoxSpace

    11 ай бұрын

    @@Tarodev ooh ooh, I got an idea, is it related to GMTK?

  • @Tarodev

    @Tarodev

    10 ай бұрын

    @@WhitefoxSpace not even close 😂

  • @Will_Zhao
    @Will_Zhao11 ай бұрын

    Ah shiet I only just made my own tile system, didn't know this is a thing.

  • @FelipeDermann
    @FelipeDermann11 ай бұрын

    Can this component and script be used for 3D as well?

  • @fintik9907

    @fintik9907

    11 ай бұрын

    yes change cell swizzle parameter from XYZ to XZY

  • @youcancallmedoggie
    @youcancallmedoggie11 ай бұрын

    Hello there stranger

  • @lizkimber
    @lizkimber10 ай бұрын

    its odd how many people on grid tutorials make their own and not use this. Leading to there to be little information out there and finding it hard because so much has grid in the words or components but not actually using this

  • @ggwp8618
    @ggwp861811 ай бұрын

    Hi i am developing an android game with Pedestrians in the city. I have 48 game objects(pedestrians) with Skined Meshrender, a script that moves them on wayppont, a ragdoll setup and a animator. But when i turn them on my game lags Any solution to pool them or some tricks?

  • @Rammbriel

    @Rammbriel

    4 ай бұрын

    Maybe try the entity component system?

  • @ggwp8618

    @ggwp8618

    4 ай бұрын

    @@Rammbriel okay thanks for the tip

  • @magusonline
    @magusonline11 ай бұрын

    Do you still update your Patreon? It seems like it hasn't been touched since December.

  • @jyamas1382
    @jyamas138224 күн бұрын

    oh god, i def didn't just coded a grid system to then find this video ...

  • @dibaterman
    @dibaterman11 ай бұрын

    Noice

  • @__Rizzler__
    @__Rizzler__9 ай бұрын

    ambatukaaaaaaaaaaaaam

  • @olegrolik
    @olegrolik11 ай бұрын

    there is the source code?

  • @Tarodev

    @Tarodev

    11 ай бұрын

    Woops. I'll add it in a tick

  • @olegrolik

    @olegrolik

    11 ай бұрын

    @@Tarodevthank you!

  • @vigscodes
    @vigscodes5 ай бұрын

    If Unity provides a Grid component why does it seem like somany projects are implementing their own? Is there some con to the Unity Grid?

  • @Tarodev

    @Tarodev

    5 ай бұрын

    Nope. It's that people don't know about it. I didn't even know about it for many years.

  • @notDiru
    @notDiru11 ай бұрын

  • @Layarion
    @Layarion9 ай бұрын

    bold of you to assume i know wtf serialized means :P

  • @Singsongpingpong
    @Singsongpingpong10 ай бұрын

    Im new and wanna learn unity. My first objective is to learn the components to make a 2d turn base strategy game. However most grid based tutorials are obsolete cause unity has a built in grid function? Problem is, I cant find any resources to learn how to use it and it feels like im stuck at step 1. Anyone can guide me on how I should progress my journey?

  • @Tarodev

    @Tarodev

    10 ай бұрын

    Isn't that what this video taught you? 🤔 Also, go checkout my older grid series to learn the basics of grid building and turn based.

  • @badescuandrei6766
    @badescuandrei676611 ай бұрын

    Because the hexagon is the bestagon

  • @Tarodev

    @Tarodev

    11 ай бұрын

    This man gets it

  • @mikrokaulis32k68
    @mikrokaulis32k689 ай бұрын

    make this a short.

  • @Tarodev

    @Tarodev

    9 ай бұрын

    Landscape

  • @renansilva3879
    @renansilva387911 ай бұрын

    Hexagonal grids must be annoying to calculate distance and areas.

  • @Tarodev

    @Tarodev

    11 ай бұрын

    Yup, they can be. But NO MORE, with my incredible grid component, annoying calculations are a thing of the past. Buy yours today and receive a second grid component FREE to give to a friend or loved one.

  • @Tarodev

    @Tarodev

    11 ай бұрын

    Also, that was probably the worst reply I've ever given on YT. Sorry

  • @renansilva3879

    @renansilva3879

    11 ай бұрын

    @@Tarodev I'm happy to see you're back, even tho this is the first of yours I have watched 😅

  • @Tarodev

    @Tarodev

    11 ай бұрын

    @@renansilva3879 Hah. Welcome aboard