Unity Tilemaps - Hex, rectangle, isometric + rule tiles

Поділитися
Вставка
  • Опубліковано 18 вер 2024

КОМЕНТАРІ • 41

  • @meowsqueak
    @meowsqueak 3 роки тому +22

    Great tutorial!
    Just to clarify, that little circular arrow in the centre of the Rule Tile rule grid is actually “rotate” not “flip”. So it will apply the rule to each 90 degree *rotation* of the tile. This isn’t quite the same as flipping (the double-arrow symbols) as they act like mirrors and reverse left/right, which will produce a different result.
    You can also use [ and ] to rotate the current brush tile manually, and hold shift with [ and ] to flip. In my default Unity install the latter conflicts with another binding so I had to go into Unity preferences to sort that out.

    • @Tarodev
      @Tarodev  3 роки тому +1

      Great info, thank you! Pinned

  • @ericblakenburg5380
    @ericblakenburg5380 Рік тому +3

    This was thé tutorial I was looking for. Thank you so much ❤️❤️❤️

  • @SteveTrabold
    @SteveTrabold Рік тому +1

    Thank you for these! Your tutorial style is fantastic...clear good information!

  • @deaddoctor
    @deaddoctor 3 роки тому +3

    Awesome tutorial!

    • @Tarodev
      @Tarodev  3 роки тому

      Glad it helped you :)

  • @venturar
    @venturar 3 роки тому +7

    Hey man nice Chanel, it would be nice a video about 2D optmization,its something that would help a lot of mobile devs like me

    • @Tarodev
      @Tarodev  3 роки тому +4

      That's a good idea. I'll add it to the list 😊

  • @benjaminborja5029
    @benjaminborja5029 3 роки тому +3

    Hey man, i like your style explaining stuff, did you know if there is an asset that can combine multiple single tile colliders into one single big collider? I have phisycs issues when I'm using tiles beacuse of that...thank you!

  • @cryser5
    @cryser5 10 місяців тому +1

    How the fuck did I miss this godlike thing, that u can drop instantly in playmode with this option enabled u have casually shown... dude this assembly time was driving me crazy...

  • @fokeyjo
    @fokeyjo Рік тому +1

    15:50 you allude to something I'm struggling with, how you implement things like that walkable flag - Are you working with a rigidbody or using your own collision routines and stopping the player? I'm trying to develop a game with enemies walking in one area and the player walking in another, so their collision maps are the exact opposite, and colliders seem to be universal across all objects with rigidbodies.

    • @fokeyjo
      @fokeyjo Рік тому

      Think I realise now what this about - for when you are doing calls to Tilemap.GetTile(), this is so you can get useful information from the tile without attaching a gameobject and having to do GetComponent calls to it. Trying this out, though, I've found the line to set up the menu (in 2021.3) should be more like this now: [CreateAssetMenuAttribute(menuName = "2D/Tiles/YourCustomGameRuleTile")] otherwise it will either do nothing and fail silently, or start warning about a class name mismatch.

  • @SaltyDylpickle
    @SaltyDylpickle 2 роки тому +1

    Heya, thanks for this tutorial!
    I am wondering how I can make the gridlines show in my game view? It seems to be default in yours, but mine only show in the scene view...

  • @ГеймДеб
    @ГеймДеб 2 роки тому +7

    Great tutorials.
    It would be even more magnificent if you attach assets, so we can follow along

  • @DemonRax47
    @DemonRax47 7 місяців тому

    Hey there! Thanks for the great video, helped me to get the tilemaps stuff going!
    I got a question though, would appreciate any help. In your example, you add the override for the RuleTile. I'm not using them yet but I thought it would be great to add more attributes to a normal tile, such as a bool, for example. I went for the same code you did, adding the override etc - but for the Tile, instead of the RuleTile. And it does not work. I think what I'm missing and I couldn't figure it out from your video - is how do I make the script work? How should I connect it to the Tile so the method is overridden? Script cannot be added to the game object as a component, because it's not a MonoBehaviour, and if I just leave it there - it seems like the running application is simply ignoring it.
    Thanks!

  • @drunk3np1nky40
    @drunk3np1nky40 2 роки тому +1

    Great video! I wonder if it's possible to highlight tiles on tilemap. Has anyone ever implemented anything like this?

    • @Tarodev
      @Tarodev  2 роки тому

      Your interaction options are far greater when generating the tile map via code (not using unity tile map). But for tile map you can use a custom tile class and in your mouse logic script, detect the current hovered tile and raise the color value a bit.

  • @misal-isahabe5281
    @misal-isahabe5281 2 роки тому

    Thanks for this contant!

  • @PeterMilko
    @PeterMilko 2 роки тому

    Can you show how to make a diagonal path for a grid tile map?

  • @PK-se2jh
    @PK-se2jh 2 роки тому

    thankyou soo much :)

  • @midniteoilsoftware
    @midniteoilsoftware 2 роки тому +1

    Where did the GameRuleTile script come from? It just seemed to magically appear when you created the rule tile. No such script was created when I created my rule tile. I manually create a GameRuleTile script but it will not allow me to add it to my rule tile. I'm using Unity 2020.3.19f1.

    • @Krobelux
      @Krobelux 2 роки тому

      It might be a newer version feature. I was working with the 2019 version and it didn't have this feature for me. I recently updated to 2022 version and it autocompletes for me.

    • @alwaid8149
      @alwaid8149 6 місяців тому

      Late reply but maybe someone else will need it: make sure you are using "using UnityEngine.Tilemaps" also the script base class should be TileBase, not MonoBehaviour

  • @mostlyokay
    @mostlyokay Рік тому

    So from other comments I gather this isn't useful if I want to implement A*? I'd have to create the map completely in code? Is there a hybrid approach which would let me "paint" the tilemap but have a representation of it in code?

    • @Tarodev
      @Tarodev  Рік тому +1

      You can absolutely implement a* on this as you can grab the tile positions just the same as a code map. Deciding between a tile map vs code is an important decision... Tile map is easy, but code gives you way more power.

    • @kyllzoldyck
      @kyllzoldyck Рік тому

      @@Tarodev do you have an example using tilemap and pathfinding? I was looking but I don’t find it, only maps generated by code

  • @ivans8713
    @ivans8713 Рік тому

    how is it showing grid for him after painting, and for me it doesnt

  • @Hinkel84
    @Hinkel84 2 роки тому +1

    Do you have the template for such a hex file? I don't know how to start in photoshop, for the tile :(

    • @Tarodev
      @Tarodev  2 роки тому +3

      What I do is create a hexagon in Unity, then open it in photoshop. So do what I do at 2:30, but for hex :)

    • @Hinkel84
      @Hinkel84 2 роки тому

      @@Tarodev Hello, thx. But I have no idea, where you open it in photoshop?

    • @Tarodev
      @Tarodev  2 роки тому +2

      @@Hinkel84 One sec mate I'll get you one

    • @Tarodev
      @Tarodev  2 роки тому +5

      @@Hinkel84 Flat top: i.imgur.com/j7BmCjm.png
      Pointy top: i.imgur.com/PwOYWnX.png

    • @Hinkel84
      @Hinkel84 2 роки тому +2

      @@Tarodev Thank you very much for the awesome help :)

  • @tobiasfilms8825
    @tobiasfilms8825 3 роки тому +1

    Very helpful tutorial! Is there a way to add rule-based tiling with hexagons?

    • @Tarodev
      @Tarodev  3 роки тому +1

      Yup absolutely! Word of warning though: the required tile combinations go up drastically whilst using hexagons. Be prepared for a bigger art budget/time investment!

  • @noobcraft5712
    @noobcraft5712 3 роки тому +2

    Why are you not uploading

    • @Tarodev
      @Tarodev  3 роки тому +3

      That's so funny. You commented this just as I started uploading a new video. You sensed something was up :P

    • @noobcraft5712
      @noobcraft5712 3 роки тому

      @@Tarodevoh good

  • @derekspammerton5295
    @derekspammerton5295 9 місяців тому +1

    I'm getting so lost all over the place... none of my files match aaaa