Search Unity

[RELEASED] Super Tilemap Editor

Discussion in 'Assets and Asset Store' started by CreativeSpore, Feb 21, 2016.

  1. spottedzebra

    spottedzebra

    Joined:
    Oct 26, 2013
    Posts:
    39
    I'm using the latest super tilemap in Unity 2020.3.2f1 and holding alt then clicking on a tile does not toggle the collider on/off -- I see the black dot when pressing alt but clicking does nothing. Any suggestions?
     
  2. GameDevSA

    GameDevSA

    Joined:
    Dec 12, 2016
    Posts:
    252
    I had a problem where I couldn't paint. Managed to solve it. I didn't realise you had to have "Gizmos" on. Also didn't realise I'd accidentally turned them off. Might be worth adding that to the documentation about the Gizmos if you haven't already in the latest version - or maybe I missed it. Couldn't see it though.

    upload_2021-11-15_18-42-10.png
     
    Last edited: Nov 15, 2021
  3. GameDevSA

    GameDevSA

    Joined:
    Dec 12, 2016
    Posts:
    252
    Is there a way to hide / unhide the grid? I was looking in the gizmos which is how I accidentally turned them off but still couldn't see an obvious solution.
     
  4. FabienC

    FabienC

    Joined:
    May 9, 2014
    Posts:
    7
    Hi There,

    I've been using SuperTilemapEditor lately and I find it FAR better than the default Unity Editor Tool for an in-editor tilemap painting tool.
    Mainly, the reasons are :
    - Prefabs can be attached directly to tiles !!!
    - Tilemap configuration is much more detailed and allow size limit that is usefull to design levels by chunks.
    - Palettes are linked to layers. This avoids me a lot of mistakes !
    - Tile painting tools are realy straight forward with no "custom brushes".

    I've unfortunately also encountered the issue when erasing tiles with prefabs on tilemaps embeded in a prefab :
    "InvalidOperationException: Destroying a GameObject inside a Prefab instance is not allowed."

    That's a mistake I often make as my world tilemap is divided in chunks.
    Even if I can workaround, side-effects are very impacting. I would really appreciate a fix for that in a future version :)

    By the way, is the tool under development/support ?

    Well done for the great job.
     
    CreativeSpore likes this.
  5. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,192
    Yes, there is still support, but not fully working on this atm. When I have some time I still make some updates to make it work with latest versions of Unity and giving support mainly through the support email.
    That issue you mention is because the way the prefabs work now, not allowing to modify them from the scene like removing gameobjects. I tried to make a work around, but I think the best way to avoid that is not using prefabs and instead use scenes as prefabs. you can still load the scene in additive mode with no problems.
     
    SugoiDev likes this.
  6. bdsowers

    bdsowers

    Joined:
    Oct 11, 2014
    Posts:
    14
    Question regarding performance:
    I'm trying to use STE in a world streaming system, and I'm noticing a huge performance hit on TilemapChunk::Enable -> UpdateMesh. This seems to be because the chunks have their mesh filter setup as DontSave, so it regenerates the mesh upon loading the tilemap. There's also some code in Awake that clears out the mesh filter either way.

    I don't need dynamic tilemaps, they're all static at runtime. Can you foresee any problems of removing that DontSave so that the meshes do get saved & removing the Awake code so the meshes aren't regenerated aren't regenerated unnecessarily?

    (I realize you don't actively work on this these days, but it's still my favorite tilemap system, so trying to keep on using it. :)
     
  7. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,192
    If you search in the thread, you can see some modifications that could be made to improve the performance, like only updating the mesh when the tilemapchunk if being rendered.
    Also, you can try removing that flag. The scene will be bigger in size, but it will save time creating the mesh during the awake.
    Glad to know it's still your favourite :) Thanks!
     
  8. vambier

    vambier

    Joined:
    Oct 1, 2012
    Posts:
    102
    I have a question about shadows, I see that there is an option in the renderer for enabling the casting of shadows, but when I do that they still don't work. I have a 2d point light in my scene, when I add a 'Shadow Caster 2D' to an object it casts shadows. But when I enable shadow casting on a STETilemap it doesn't. When I look at the Tile Chunks I don't see any 'Shadow Caster 2D' components. Is it possible to cast shadows from 2D lights?
     
  9. Pattrigue

    Pattrigue

    Joined:
    Nov 24, 2018
    Posts:
    67
    I cannot get sprite masks to work with STE tilemaps when I am using a custom shader. It works only with the two built-in shaders Sprites/Default and Sprites/Diffuse.

    My investigation shows that STE might be hardcoded to only work with sprite masks for those two shaders, which is a shame since I cannot use my own shaders with sprite masks.

    Inside TilemapChunck.cs
    upload_2022-4-11_9-34-42.png
    upload_2022-4-11_9-34-35.png

    Is there anything I can do about this? I would very much like to use sprite masks with STE tilemaps that use custom shaders.

    EDIT:
    I figured it out. You have to create your own stencil shader and modify the TilemapChunk class to use different shaders and not just the former two. If anyone is interested, I have attached my own personal solution I use in combination with SmartLighting2D and its LitPass shader (not sure if I'm allowed to post the modified TilemapChunk script, but it's pretty useless unless you have the STE asset, so I don't think it's any harm).
     

    Attached Files:

    Last edited: Apr 14, 2022
    CreativeSpore likes this.
  10. dock

    dock

    Joined:
    Jan 2, 2008
    Posts:
    605
    Is there any support for offset row grids, such as hex grids? I'm using prefabs but I need every other row to be staggered.
     
  11. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,192
    I'm afraid not. You can only use rectangular tiles.
     
    dock likes this.
  12. Stickynoteme

    Stickynoteme

    Joined:
    Sep 30, 2020
    Posts:
    1
    Any chance they'll be an update to work with the current LTS anytime soon?
     
  13. xiao-xxl

    xiao-xxl

    Joined:
    Nov 16, 2018
    Posts:
    48
    Does SuperTilemapEditor support isometric tilemaps?
     
  14. GameDevSA

    GameDevSA

    Joined:
    Dec 12, 2016
    Posts:
    252
    Hi,

    I have a weird issue, maybe a bug?

    upload_2022-7-8_17-8-51.png

    Here is a screenshot of part of my tilemap. My tilemap contains tiles, and prefabs. For some reason, when I try and use the left tile of the red mushroom that I have circled, it thinks it's the round, grey rock that I have circled top right. The mushroom is not a prefab, but the rock is. Any idea why this might be occurring? Clearly the preview is of the mushroom.

     
  15. Raseru

    Raseru

    Joined:
    Oct 4, 2013
    Posts:
    87
    Any easy way to replace tiles when drawing like with paint but non-contiguous so it changes ones also not connected? Paint is super laggy for me due to the preview and having to paint multiple things becomes so slow that its just easier to redraw individually.

    Edit: Just realized shortly after posting this that I could technically paint with double click to avoid the preview so its not laggy. It's contiguous but at least its usable.
     
    Last edited: Sep 7, 2022
  16. Saishy

    Saishy

    Joined:
    Jun 3, 2010
    Posts:
    79
    If you are painting in a prefab, disable autosave to speed it up.
     
  17. zeroneon

    zeroneon

    Joined:
    Dec 25, 2021
    Posts:
    5
    upload_2022-9-21_0-3-0.png
    I just bought the asset but I cant use it at all, I am getting these errors. I imported the asset into a completely new project and I get the same. Unity 2020.3.28f1
     
  18. zeroneon

    zeroneon

    Joined:
    Dec 25, 2021
    Posts:
    5
    upload_2022-9-22_12-12-13.png
    This does not appear for me at all and I dont know what I am doing wrong
     
  19. HuginnRaven

    HuginnRaven

    Joined:
    Dec 20, 2015
    Posts:
    33
    I've searched and searched and searched and can't seem to find how to reference the generated collider through script. Am I blind?
     
  20. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,192
    You cannot reference a collider. For optimization, they are all part of a single mesh.
     
  21. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,192
    I don't see that error in latest 2021.3.11f1. But it's basically adding two shaders used by tilemap mask feature in Allways include shader.
    upload_2022-11-1_10-28-31.png

    You can remove that script file and just add them here if you use that feature.
     
  22. HuginnRaven

    HuginnRaven

    Joined:
    Dec 20, 2015
    Posts:
    33
    Ok, thanks for the quick answer. I'm trying to combine this with BulletPro (if you're familiar with it). That asset doesn't use colliders but I understand that I can use OverlapCircle to catch any bullet that interacts with any environment. I'm confused as to how to do that with your asset now.
     
  23. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,192
    Not sure how BulletPro works, but it should be easy to check a bullet collision if you use raycasting from previous bullet position to new position. If there is a collision in between, you will receive a HitCollision with the hit point.
     
  24. Deleted User

    Deleted User

    Guest

    Is there an 'easy' way to merge 2 adjacent Tilemaps ?

    I have procedurally generated world in my game; I prepare tile maps and then my generator puts them randomly next to each other. The obvious issue is that auto-tile brush don't tile at the edges.

    I was thinking to create a bigger one and then 'copy' all the ones that make up the world (with get/set tiles individually) but there might be a better solution ?

    Thanks,
    FYI i have re-opened a project from 2016, and no error ! You made an amazing asset !

    upload_2022-11-23_12-34-46.png
     
  25. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,192
    First of all, I'm glad you enjoy the tool.

    About your question, I cannot think of other way of doing that.
    I remember making a game myself and end up by copying the rooms into a bigger tilemap. So I guess you will need to do that.
     
    Deleted User likes this.
  26. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,440
    just for *fun*, tested 4096x4096 tilemap, still runs - but starting to get slow and quite large scene file : )

    I don't need so large map, but just testing, i guess it might work better if split into smaller maps / separate scenes?
    Or could it be possible to generate areas runtime, when needed?

    upload_2022-12-24_0-19-3.png
     
  27. JForce-Games

    JForce-Games

    Joined:
    Aug 29, 2013
    Posts:
    7
    Hi, I'm trying to get your parallax scrolling working with split-screen, with multiple levels simultaneously. Wondering if you could help with this at all. Thanks for any answer!

    Btw I've built a very robost in-game level editor using Super Tilemap, it works really great. I'll show you a video when it's ready.
     
    Last edited: Dec 28, 2022
  28. JForce-Games

    JForce-Games

    Joined:
    Aug 29, 2013
    Posts:
    7
    Nevermind I figured it out!
     
    CreativeSpore likes this.
  29. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,192
    With some updates, to add more features, the performance of big maps was affected, but you can check the code and should be easy to remove all parts you don't need to increase the performance.

    And yes, you can generate a map in runtime. Check this post to see an example:
    https://forum.unity.com/threads/released-super-tilemap-editor.387330/page-9#post-2876541
     
    mgear likes this.
  30. Advy87

    Advy87

    Joined:
    Nov 1, 2013
    Posts:
    3
    Hi, thank you very much for your work.

    When I put the tiles in fairly large maps the overlapping of the tiles on the same layer as the player starts to not working correctly (usually when these tiles are far away from the player's initial position), whereas if I add a normal Unity spriterender it works as usual and it overlaps the player at a certain position of the sprite as expected, do you have a solution for this?
    (Forgot to say: they usually are multiple tiles 16x16 tied together to form an in game image)
    Thanks in advance
     
    Last edited: Feb 7, 2023
  31. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,192
    Not sure what it can be. Can you send me by email a package with a scene example having that issue?
    Best regards!
     
  32. XToGo

    XToGo

    Joined:
    Oct 30, 2018
    Posts:
    9
    Hey! First off, awesome tilemap tool. Best I've used :3 However I'm facing a problem here. I want to check if a tilemap is colliding with another tilemap. The normal ways of checking that doesn't see to work. Wanted to try using Physics2D.OverlapCollider but I can't find any method to get the edgecollider for that. Any idea on how to check that? (creating a randomly generated level out of tilemaps. Want to check "Hey, does this tilemap collide with another one? Yes? If the other one further down? Yes? Okay then deactivate this tilemap here!"
     
  33. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,192
    It should receive the collision. Did you add a rigid body in the tilemap? You need that to get collision events.
     
  34. wedgiebee

    wedgiebee

    Joined:
    Aug 9, 2016
    Posts:
    40
    Hello! Starting to play around with Super Tilemap Editor and I have a couple questions.

    1) I'm making a top-down game, and I want to have solid obstacles auto-rotate during gameplay to create a hazard for the player. Let's say for example a 3x1 group of tiles (though I'd want the flexibility to make any size), what would you recommend to go achieving that? Should I put each auto-rotating obstacle on its own tilemap? How do I control where the "center" of the tliemap is so that I ensure it auto rotates around the desired pivot?

    2) In the editor, how do I select and move a rectangle of tiles across different tilemaps? For example let's say I have a dungeon with several rooms. Across the whole dungeon I have a FloorTilemap, WallsTilemap, and DecorTilemap. I want to select all the tiles in Room A and move them to a different location - how can I do that without having to go into each individual tilemap and moving those tiles from Room A to the target location?
     
  35. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,192
    Using the tileviews, you can save a selection of tiles to be used across tilemaps.
     
  36. RandomCharacters

    RandomCharacters

    Joined:
    Nov 29, 2012
    Posts:
    262
    In unity 2023.1.1 and above, there are a tone of warnings given in the console. These obviously are annoying and drowning out other issues. I was able to fix some of them myself, but others require more advanced knowledge of what is going on. Is it possible to fix them at some point?

    ////////////////////////////////////////////////

    Assets\CreativeSpore\SuperTilemapEditor\Scripts\Tilemap\Brush\BrushBehaviour.cs(29,48): warning CS0618: 'Object.FindObjectsOfType<T>()' is obsolete: 'Object.FindObjectsOfType has been deprecated. Use Object.FindObjectsByType instead which lets you decide whether you need the results sorted or not. FindObjectsOfType sorts the results by InstanceID but if you do not need this using FindObjectSortMode.None is considerably faster.'

    Assets\CreativeSpore\SuperTilemapEditor\Scripts\Tilemap\Tileset.cs(671,37): warning CS0618: 'TextureImporter.spritesheet' is obsolete: 'Support for accessing sprite meta data through spritesheet has been removed. Please use the UnityEditor.U2D.Sprites.ISpriteEditorDataProvider interface instead.'

    Assets\CreativeSpore\SuperTilemapEditor\Scripts\Editor\STEEditorSymbols.cs(30,36): warning CS0618: 'PlayerSettings.GetScriptingDefineSymbolsForGroup(BuildTargetGroup)' is obsolete: 'Use GetScriptingDefineSymbols(NamedBuildTarget buildTarget) instead'


    Assets\CreativeSpore\SuperTilemapEditor\Scripts\Tilemap\Editor\AtlasEditorWindow.cs(136,52): warning CS0618: 'Object.FindObjectsOfType<T>()' is obsolete: 'Object.FindObjectsOfType has been deprecated. Use Object.FindObjectsByType instead which lets you decide whether you need the results sorted or not. FindObjectsOfType sorts the results by InstanceID but if you do not need this using FindObjectSortMode.None is considerably faster.'
     
  37. Deleted User

    Deleted User

    Guest

    Hi !

    Writing out of despair because I can't get this to work. Some posts above I had mentioned I needed to copy a set of tiles into a bigger one (to get the adjacent tiles to snap correctly).

    I have the following code :
    Code (CSharp):
    1. using System;
    2. using CreativeSpore.SuperTilemapEditor;
    3. using Cysharp.Threading.Tasks;
    4. using UnityEngine;
    5.  
    6. [RequireComponent(typeof(STETilemap))]
    7. public class GridMerger : MonoBehaviour
    8. {
    9.     [SerializeField] private Tileset tileSet;
    10.     private STETilemap targetTilemap;
    11.  
    12.     [SerializeField] private int gridWidth = 15;
    13.     [SerializeField] private int gridHeight = 11;
    14.  
    15.     private void Awake()
    16.     {
    17.         targetTilemap = GetComponent<STETilemap>();
    18.         targetTilemap.ClearMap();
    19.         if (tileSet != null) targetTilemap.Tileset = tileSet;
    20.     }
    21.  
    22.     private async void Start()
    23.     {
    24.         await UniTask.Delay(TimeSpan.FromSeconds(1), ignoreTimeScale: false);
    25.         Iterate();
    26.     }
    27.  
    28.     private void Iterate()
    29.     {
    30.         var t = FindObjectOfType<TileType>();
    31.    
    32.         // public class TileType : MonoBehaviour
    33.         // {
    34.         //     public enum Layer
    35.         //     {
    36.         //         BACKGROUND = 0,
    37.         //         BLOCKS = 100,
    38.         //         LADDERS = 200,
    39.         //         GRASS = 300
    40.         //     }
    41.         //
    42.         //     public Layer layer;
    43.         // }
    44.    
    45.         var tilePosition = t.transform.position;
    46.  
    47.         var sourceTilemap = t.GetComponent<STETilemap>();
    48.         for (var x = 0; x < gridWidth; x++)
    49.         {
    50.             for (var y = 0; y < gridHeight; y++)
    51.             {
    52.                 var tileData = sourceTilemap.GetTileData(x, y);
    53.                 var tileId = Tileset.GetTileIdFromTileData(tileData);
    54.                 var brushId = Tileset.GetBrushIdFromTileData(tileData);
    55.                 targetTilemap.SetTile(x * gridWidth * (int) tilePosition.x, y * gridHeight * (int) tilePosition.y, tileId, brushId);
    56.             }
    57.         }
    58.  
    59.         targetTilemap.UpdateMeshImmediate();
    60.     }
    61. }
    My issue is that I keep getting:
    Code (CSharp):
    1. TileId 65535 not found! GridPos(-5460,-66) tilaData 0xFFFF
    2. and
    3. BrushId 4095 not found! GridPos(0,-330) tilaData 0xFFFFFFF
    Errors I don't understand why; this is from your example in one of your blog posts.

    Any chance you could help me out ? Thanks !
     
  38. GameDevSA

    GameDevSA

    Joined:
    Dec 12, 2016
    Posts:
    252
    I am having some weird issues trying to get the Universal Render Pipeline working with lighting. I just wanted to check if it was a bug or maybe I needed to upgrade, or maybe I'm missing something. I'm using v1.6.2, and Unity 2019.4.33f2 LTS.

    Short version is, I set up the new render pipeline to get 2D lighting working, had to create a new default material from that and attach it to the tilemaps in the renderer, which I did:

    upload_2023-8-11_0-50-43.png

    However, in my tilemap heriarchy, the only tilemap that is affected by lights is the top one. The rest behave as if there was no lighting. Example:

    upload_2023-8-11_0-51-29.png

    upload_2023-8-11_0-51-45.png

    I have a point light over the water, which is why there is that soft pool of colour. That's all in the Base tilemap. All the trees n waterfalls n that should be working, but aren't. The materials are attached the same in all the tilemaps. The only pattern I can see is the tilemap heirarchy. Anything I'm missing?

    Some of the tilemaps use prefabs, but I have both prefabs and not prefabs for the water and they all work.

    Thanks.
     

    Attached Files:

    Last edited: Aug 11, 2023
  39. GameDevSA

    GameDevSA

    Joined:
    Dec 12, 2016
    Posts:
    252
    ** Update **

    I tried updating to the latest super tilemap editor, 1.7.2, that didn't fix it. I also tried taking them out of the tilemap group. That didn't fix it.

    Just to add, my tilemaps are under a Tilemap Group. The only one that is working with lighting at this moment is the at the top.

    upload_2023-8-11_11-23-15.png

    I just did an experiment and turned off all my tilemaps in the scene. I then made a new tilemap. It behaved properly with the light. I then made a second tilemap. It did not behave properly with the light. There really does seem to be a limit of 1 tilemap only working with a light source at the moment. I'm not sure if I can change how I have things set up to avoid this?
     
  40. vambier

    vambier

    Joined:
    Oct 1, 2012
    Posts:
    102

    I also updated to 2023.1 for a specific problem I had and there was not much that broke except for one thing, the lighting on Super Tilemaps, I have tilemaps in my scene with a lit sprite material which worked fine until the update to 2023.1. Any Idea what's causing this?
     
  41. vambier

    vambier

    Joined:
    Oct 1, 2012
    Posts:
    102
    Is this asset dead? I see that the latest version is from late last year and that questions on here are no longer answered.
     
  42. vambier

    vambier

    Joined:
    Oct 1, 2012
    Posts:
    102
    More than two months and no replies on this thread so I guess it's dead:(
     
  43. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,192
    I missed the Unity notifications for forum updates. I saw it now. I am not working full time on this anymore, but still giving support. I recommend you to use the support email as well, as it's more likely I see it than here.
    I need to check this lighting issue properly and need some time.
    Can you send me a test project (without the Library folder please) to my email?
    Thanks and sorry for my late answer.
     
  44. vambier

    vambier

    Joined:
    Oct 1, 2012
    Posts:
    102
    Wow, I really thought the asset was dead. I will see if I can create a test scene but I've currently switched back to 2022.3 were it still works and have created my own lit 2d shader in shadergraph because I want to also pixelate the light texture.

    Another question I have though about 2d lighting, is there something build in that can use the tilemap colliders as shadow casters for 2d lights?
     
  45. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,192
    No that I can think off. You can create 2D edge or polygon colliders, each with pro and cons.
    But I cannot tell if that is working fine casting shadows.
     
  46. FabienC

    FabienC

    Joined:
    May 9, 2014
    Posts:
    7
    Hi @CreativeSpore !

    I've been using your package for a RogueLite project and, thus far, your tilemap editor seems to still be way ahead Unity tilemap package in many ways, even with TilemapExtras !

    I've bumped on a bug on your A* pathfinding algorithm when trying to use it on a tilegroup that is not positionned on the {0,0,0} world coordinate origin. There are few confusions between local and world coordinates usage that break it.

    You will find fixes on the package attached.

    I'm not fully convinced by the fact of using TileGroup's transform to fix this as most of your local<->global position conversions are using TileMap's transforms. I'm sure you will be able to either confirm usage or find a better fix ;)

    In the package, I also changed the behaviour of "PathfindingBehaviour" to make it more usable in general cases where entities motions are separated from their pathfinding, however, it is not related to the bug.

    Feel free to use the fix if you think it is relevant :)

    Thanks again for this awesome plug-in !
    Cheers :)
     

    Attached Files:

    Last edited: Jan 11, 2024
    CreativeSpore likes this.
  47. FabienC

    FabienC

    Joined:
    May 9, 2014
    Posts:
    7
    I've also bumped into an easy-to-reproduce bug that makes prefabs attached to tiles not to be cleaned properly when painting on prefab tilemaps without entering prefab mode.
    However, this bug seems to be very tricky and much harder to solve without a full knowledge of the package ^^'
     
  48. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,192
    This is awesome! Thanks for letting me know and for taking some time to create this patch :)