Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

UniTile - 2d Tile-based Map Editor within Unity

Discussion in 'Assets and Asset Store' started by mudloop, Jan 6, 2011.

  1. mojtaba64

    mojtaba64

    Joined:
    Aug 3, 2010
    Posts:
    56
    I realize that I can use unlit shader for inner tiles that don't need transparent shader.
    I'm writing an editor script for this,
    I want to duplicate the tile layer and remove edge tiles (transparent tiles) and remove inner tiles in the other layer...
    I want to do this with TileReplacer and Rebuild the layer.
    My problem is that I can't (or don't know how) access to RebuildMap in TileLayerEditor or functions in TileReplacerEditor. Could you help me on this?

    I've sent you an email (not for this problem) that you didn't answer. (mojtaba.rgb@gmail.com)

    Thanks
     
  2. davenirline

    davenirline

    Joined:
    Jul 7, 2010
    Posts:
    969
    Hello,

    I just bought your product and it's been great! I have some problem, though.

    We have 16x16 sized tileset having some elements that are 64x64 (for example buildings). We want to be able to map only one data for these 16 tiles. Currently, one tile data is generated per tile. Our problem is when we set a prefab to the tile, it generates 16 tile data which is a waste considering that these 16 tiles only represent one object in the game. Is this feature now supported? I hope you implement it if not.

    My workaround is to create a 64x64 layer on top of the 16x16 layer and layout the buildings in this layer. But the problem is I can't get a fine granularity when placing the buildings. I'm forced to have a 64x64 space between buildings.
     
  3. davenirline

    davenirline

    Joined:
    Jul 7, 2010
    Posts:
    969
    Hello Mudloop,

    I'm sorry. It's just not working for us. It fights against our workflow. We want to work with a set of tiles as a different object (more like just a rendered object) and then just add or remove them from the scene. It also removes the transform gizmo and forces us to work in tile mode. It's not practical in other parts of the game.

    I want a refund if it's possible. Please send me details on how to make a refund.
     
  4. Zampi

    Zampi

    Joined:
    Nov 11, 2012
    Posts:
    4
    Thanks for your product. I bought it and try to use, but have problem with procedure generation tilelayer from serialized data.

    This is part of my code where i try set tiles (r is TileInstance[,,])
    Code (csharp):
    1.  
    2.                     var layer = layerGO.AddComponent<TileLayer>();
    3.                     layer.layerSize = new Vector2(r.GetLength(2), r.GetLength(1));
    4.                     layer.material = Defines.Instance.BaseTileMat;
    5.                     layer.tileSize = new Vector2(16, 16);
    6.  
    7.                     List<TileChange> changes = new List<TileChange>();
    8.                     for (int y = 0; y < r.GetLength(1); y++)
    9.                         for (int x = 0; x < r.GetLength(2); x++)
    10.                         {
    11.                             var tile = r[l, y, x];
    12.                             if (tile != null) Debug.Log(tile.id);
    13.                             changes.Add(tile != null ? new TileChange(x, y, tile.id) : new TileChange(x, y, -1));
    14.                         }
    15.  
    16.                     layer.SetTiles(changes.ToArray());
    17.  
    After it nothing happend. Tile was setted, but not display.
     
  5. bertie

    bertie

    Joined:
    Sep 17, 2012
    Posts:
    1
    I think you need to redraw the layer groups, try this:

    for(int i=0;i<=Mathf.Floor(layer.layerSize.x/layer.groupSize.x);i++)
    for(int j=0;j<=Mathf.Floor(layer.layerSize.y/layer.groupSize.y);j++)
    TileLayerUtil.RedrawGroup(layer, i,j);

    Or just press the rebuild button for that layer.
     
  6. crafTDev

    crafTDev

    Joined:
    Nov 5, 2008
    Posts:
    1,820
    Was Unitile 3D ever released? That's the one I am interested in...
     
  7. renman3000

    renman3000

    Joined:
    Nov 7, 2011
    Posts:
    6,697
    Hi @Mudloop.
    Is there a clear distinction in memory use, between several smaller tile sets and one large one? Can one say one tile at this size is this much memory, so x number of tiles at this memory is just that memory multiplied over that value?
     
  8. Sinperhezine

    Sinperhezine

    Joined:
    Mar 14, 2012
    Posts:
    10
    i brought you product in hope of making a procedure generation levels but i'm having a bit of trouble trying figure out how to plug in the code properly
     
  9. subone

    subone

    Joined:
    Feb 27, 2013
    Posts:
    26
    From where can I get materials like the one in this screenshot ?
    $screenshot1.png
     
  10. Jbaker08

    Jbaker08

    Joined:
    Oct 8, 2012
    Posts:
    52
    Weird bug but whenever I try to add a tile in the main layer it exits the layer?
    Makes it virtually impossible to mass produce the same tile over and over (like black space for example).

    So I click > Main_Layer > Select my tile on the right > Hover my mouse over the grid > Click to draw > Draws one tile and exits layer.
    Then i have to go through the same process all over again just to add an extra tile?
     
  11. MarigoldFleur

    MarigoldFleur

    Joined:
    May 12, 2012
    Posts:
    1,353
    Hopefully you're still around, but this is a bug in Unity 4 with Unitile. Thankfully, it's super easy to work around! When placing tiles, first press Q to enter pan mode. This will keep you from exiting the tile layer when you click things.
     
  12. Mike3998

    Mike3998

    Joined:
    May 28, 2013
    Posts:
    2
    Got problem with create objects. I saw that it creates colliders around drawn tiles. In my project it creates only one small collider at 0,0,0. Any idea why?
     
  13. MarigoldFleur

    MarigoldFleur

    Joined:
    May 12, 2012
    Posts:
    1,353
    Did you remember to rebuilt the tile layer before trying to create the objects? Are you using custom colliders or just the default Unitile ones?
     
  14. Mike3998

    Mike3998

    Joined:
    May 28, 2013
    Posts:
    2
    When I try to rebuild, it still creates small box collider. I'm using defatult Unitile colliders.
     
  15. renman3000

    renman3000

    Joined:
    Nov 7, 2011
    Posts:
    6,697
    Is there a way to scroll a tile map? I use SetTextureOffset for an ordinary texture but with Unitile it is obviously different. Anyone?
     
  16. Euthyphro

    Euthyphro

    Joined:
    Jun 29, 2013
    Posts:
    9
    I'm looking at unitile as a potential map maker for a game I'm making but I'm just wondering, I know poly type collision is not a part of this package, nonetheless is it possible for me to add this sort of collision detection in on my own for my project? Or is the map maker plugin completely closed off?

    Thanks.
     
  17. Ben-BearFish

    Ben-BearFish

    Joined:
    Sep 6, 2011
    Posts:
    1,204
    Was anyone able to fix this, or know where to look in the UniTile code to fix it? I get tiles that seem to have the wrong tile uv lookup as MetaMythril had.

    Thus, there are lines inbetween tiles.
     
    Last edited: Nov 7, 2013
  18. axxion

    axxion

    Joined:
    Aug 16, 2014
    Posts:
    3
    this asset have 2d physc for tile maps? or what tecnique using?