Search Unity

SpriteTile, a fast dynamic tile system (RELEASED)

Discussion in 'Assets and Asset Store' started by Eric5h5, Dec 11, 2013.

  1. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    I just made it yesterday. ;) It will be included in the next version, but in the meantime I attached it to this post (it should be imported into a project that already contains the other demos). Thank you for the purchase!

    --Eric
     

    Attached Files:

  2. Deathcalibur

    Deathcalibur

    Joined:
    Mar 11, 2013
    Posts:
    3
    Hello Eric,

    A friend and I have been using your plug-in off and on for about a month now and we had a few questions regarding best practices:
    1. What is the best way to design levels that include our own gameobjects? For example, we are using spritetile mainly for managing backgrounds, but we are using our own movement system instead of snapping to the grid. How can/should we design the placement of this other stuff? It doesn't seem super intuitive since there isn't a way to render the current world into the scene view.
    2. Is there any way to load multiple levels at once without us hacking up the source code too much? We were hoping to be able to create a ton of 5x5 rooms (for example) and load a couple rooms instead of pre-planning where each of the rooms would be ahead of time (think dungeon)?
    3. Have you considered writing levels out to xml or some other format instead of binary for purposes of source control? Multiple people could make changes to a level that way without conflicts.
    Thanks,
    Brendan
     
  3. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    1. You can use the preview function in the editor to show the level in the scene view. You can also do things like using triggers to mark positions of where game objects should be placed at runtime, and use GetTriggerPositions for the locations.
    2. It would be better just to save the rooms as groups, then load the group file and use CopyGroupToPosition.
    3. It's much faster and uses far less space to have levels as binary, so no, not really.

    --Eric
     
  4. Deathcalibur

    Deathcalibur

    Joined:
    Mar 11, 2013
    Posts:
    3
    Thanks for the quick response! I haven't looked through everything yet, but I'm surprised I somehow over-looked the preview functionality...

    Regarding (3), don't you think it would be great if you could edit levels in xml during development, but then maybe save levels to binary for "release" build? Faster and less space are poor reasons to not improve usage.
     
    Last edited: Jan 29, 2015
  5. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    The thing is, that's a lot of added complexity for something that I'm not convinced is really an issue. You can lock binary files, so there shouldn't be an issue with conflicts.

    --Eric
     
  6. SiliconAvatar

    SiliconAvatar

    Joined:
    Mar 23, 2014
    Posts:
    50
    Do third party map editors have some functionality that SpriteTile's built-in one doesn't? It seems feature complete to me.

    Being able to import a csv or simple tmx would benefit users like me who want to import existing assets (made with other tools) and then use SpriteTile's built-in editor thereafter. It saves me from having to reconstruct big tile maps which take longer than you'd think to create.

    As a common work-flow I don't see the advantage. Using xml for my game allowed users to edit maps easily, but as the map size grew so did the time to parse the maps. Eventually it was unusable due to loading times and I realized that most users were never going to edit my maps anyway.
     
    Last edited: Jan 31, 2015
  7. MaddoScientisto

    MaddoScientisto

    Joined:
    Jan 30, 2015
    Posts:
    62
    I bought this package just today and I've been reading the documentation to try and figure it out.

    Right now I'm using a tileset in which the tiles are 16x16 pixels (may increase to 32x32), of course it's really small but I intend to scale them up or something.

    So here are a few questions:

    1. I noticed that a bunch of objects for each layer are created at runtime, is it possible to have them be children of another gameobject so I can set the scale on that?
    2. Is there a way to make "invisible" (visible in the editor) tiles that only act as trigger? For example by marking a place to move the camera to, place the player, etc
    3. Can I somehow attach an extra gameobject to tiles? Can I do that with triggers?
     
  8. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    If you want to scale tiles, you can use SetTileScale. The objects created by SpriteTile shouldn't be touched. But note that changing tiles from 16x16 to 32x32 doesn't actually require scaling anything.

    Sure; you can set triggers for any tile. Click on the Trigger toggle in the TileEditor to see tiles with a non-zero trigger value.

    No, but you can instantiate prefabs and place them at the desired position; GetWorldPosition can be helpful for that. Also GetTilePositions and GetTriggerPositions. You might also want to look into GrabSprite.

    --Eric
     
    MaddoScientisto likes this.
  9. MaddoScientisto

    MaddoScientisto

    Joined:
    Jan 30, 2015
    Posts:
    62
    Thank you for the answers, although I already tried SetTileScale but it didn't have the effect I desired, it just made the tiles bigger but the locations were left the same.
    What I'm looking for is a way to scale the whole level and not just double the tile size, I intend making them at least 10x bigger because I noticed that the physics don't work really well at small sizes and I'm stuck working with really small floats.
     
    Last edited: Jan 31, 2015
  10. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    You can set the tile size in the TileEditor (the size is in units), and set the pixel to unit value for the tiles so they fill the squares properly.

    --Eric
     
  11. MaddoScientisto

    MaddoScientisto

    Joined:
    Jan 30, 2015
    Posts:
    62
    that's still not what I'm looking for though, I guess there's no way to scale a whole level at once
     
  12. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    I'm not sure how that's not scaling the level, since it becomes physically bigger when you do that. If you have a tile size of 1.0 and the level is 100 tiles across, then it's 100 units wide, and making the tile size 2.0 then makes the level 200 units wide.

    --Eric
     
  13. MaddoScientisto

    MaddoScientisto

    Joined:
    Jan 30, 2015
    Posts:
    62
    I'm not sure I'm completely understanding, I tried to set the tile size in the editor to 1.0 instead of 0.16 and now the tiles are smaller than the grid, then I went in the original sprite and set pixels per unit to 1 instead of 100, there's no change though

    EDIT: woops it seems I had to refresh the tiles in the editor, now I can't find where the level went, got to try that thing with the trigger and moving the player to it

    second edit: YES! works great! Thanks for the help and sorry if I didn't get it at first
     
    Last edited: Jan 31, 2015
  14. Neroir

    Neroir

    Joined:
    Feb 2, 2015
    Posts:
    7
    Hi.

    When "painting" in runtime using SetTile, is it possible to use "terrain" or "random" features like in the editor?
     
  15. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    Not at this time, but I did wonder if someone might ask for it someday, so I've kept it in mind. ;) Thanks for the feedback!

    --Eric
     
  16. archwaykitten

    archwaykitten

    Joined:
    Jun 12, 2014
    Posts:
    14
    I'm seeing lines appear between my tiles intermittently as the camera moves around my scene. I've read that changing the material on the tile sprites to one with "pixel snap" might help solve the problem, but I'm not sure how to do that. I've gone into the Assets -> Sprite Tile -> Resources directory and checked "pixel snap" on all of the materials in there, but that didn't seem to do anything. Am I on the right track at all? Is there some other step I need to take to update the tiles with a pixel snap material?

    I have successfully added pixel snap to non-tile sprites in my scene, and that seemed to help. They all have a "Sprite Renderer" object that I can access in the Inspector to easily change their materials though. I haven't found anything similar for tile sprites. Do tile sprites have "Sprite Renderers" that I can access in the same way?
     
  17. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    You can change the standard materials in the SpriteTile/Resources folder, or use SetTileScale with a value slightly higher than the tile size. i.e., if the tile size is 1.0, then do Tile.SetTileScale(1.001).

    --Eric
     
  18. archwaykitten

    archwaykitten

    Joined:
    Jun 12, 2014
    Posts:
    14
    How do I change the standard materials in the SpriteTile/Resources folder? Is it as simple as opening up that folder and checking "pixel snap" on all of the default materials within, or do I have to do something else to update my tiles with that change? Because I can't tell if just checking that box did anything at all.

    When you say to do Tile.SetTileScale(1.001), do you mean I should write code that loops through all of the tiles in my scene and sets their scale one by one in the void start() section of my code somewhere? Or is there a simple way to set the scale of all tiles in the tile map editor somewhere?
     
  19. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    Yep.

    I mean use the Tile.SetTileScale function, just like that. See page 73 in the docs.

    --Eric
     
  20. archwaykitten

    archwaykitten

    Joined:
    Jun 12, 2014
    Posts:
    14
    Are you sure simply checking "pixel snap" on all of the default materials within the SpriteTile/Resources folder is enough to change the materials used in tile maps? Above the "pixel snap" checkbox there is a color selector that allows me to change the "tint" of the material. I changed the tint on all the materials in the SpriteTile/Resources folder to be bright orange, and I still haven't seen a difference in my scene. I think I need to do something else to actually propagate these material changes into my scene.
     
  21. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    Sorry, I was looking at the DefaultNonTransparent material (where indeed it's enough to just change the material). It seems I never changed the code to use the Default and Diffuse shaders from Resources by default. I'll change that for the next version, but in the meantime you can use Tile.SetTileMaterial.

    --Eric
     
  22. archwaykitten

    archwaykitten

    Joined:
    Jun 12, 2014
    Posts:
    14
    Thank you. I'll try to get that working. Everything else in our game uses pixel snap so far, so it seems like a good idea to use it for tiles as well, whether or not it solves the problem at hand.


    I successfully used Tile.SetTileScale(1.001f) to change the scale of my tiles (I even doubled the scale to make sure I was using the function properly), but it didn't solve my problem. In fact, the lines still displayed between tiles even when the scale was set to 2.0f and the tiles were significantly overlapping.

    This leads me to believe there isn't actually a gap between my tiles, but rather that the tiles themselves are intermittently being drawn with lines near their edges. I've been using a tightly packed sprite sheet to store my tiles and then breaking them apart using a 32x32 grid within Unity. I now suspect something is going wrong with this process.

    Instead of using sprite sheets, I tried saving some of my problematic tiles separately, each in their own file. This seems to have solved the problem for that small subset of tiles. I don't know why that would make a difference, and I don't know if saving every tile in separate files will lead to performance issues in the future, so I'm hesitant to start reformatting all of our artwork that way. Does anyone know if this is a reasonable solution to this problem, or if if this is even a valid way to organize art assets in a large project (I'm more concerned with performance issues than organizational ones, at the moment)?


    I do feel like I'm closing in on a solution, at least. This forum thread is always very helpful. Thank you!
     
  23. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    I agree with that, given the evidence.

    It's quite reasonable; if you look at the demos, you can see that I did all the tiles as separate files. Unity Pro has an auto-atlas feature where tiles with the same packing tag get combined into an atlas. Although even without that, performance seems good, at least on the desktop (there's still batching going on with tiles that use the same texture). I imagine mobile is more affected by the increased draw calls.

    Another possibility is to create the sprites as an atlas with some padding between tiles (the Unity sprite editor can handle that when grid slicing).

    --Eric
     
  24. all_iver

    all_iver

    Joined:
    Nov 11, 2013
    Posts:
    159
    FYI, I ran into the tearing issue and I'm cautiously optimistic that it's solved now:

    1. Offset the tiles from each other in our texture so there are transparent gaps between them (and set the offset/padding in the sprite importer)
    2. Set the tile scale to 1.01
    3. Use the camera rounding code from here to fix scrolling waviness

    However, performance on my iphone 4 is not very good. There's a lot of jitter as the map scrolls. When you say that mobile performance is good, what is your benchmark? I'm not sure what Unity's overhead is but I've done some native ios programming and I know my phone is easily capable of scrolling a tiled map around without any lag. Even though it's a relatively older phone I feel like it's unreasonably jerky. Do you have any ios performance tips? Thanks.
     
    Last edited: Feb 10, 2015
  25. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    The Acorn Antics demo easily runs 60fps on an iPod touch 5, without any jitter. I would expect the camera rounding code is causing the jitter. I set the tile scale to 1.001 and there's no tearing (I'm using separate files with the auto-atlas function of Unity Pro).

    --Eric
     
  26. all_iver

    all_iver

    Joined:
    Nov 11, 2013
    Posts:
    159
    Thanks, that gives me something to try. Acorn Antics runs smoothly for me on an iPhone 5 (it stutters on an iPhone 4 but that's not that big of a deal). My test with nothing but a map and this code:

    Code (CSharp):
    1. void Update() {
    2.     Camera.main.transform.position += new Vector3(0, Time.deltaTime, 0);
    3. }
    Stutters pretty noticeably on the iPhone 5. So I have no idea why that's happening, but maybe if I study the Acorn demo I'll find something else different.

    With the tile scale at 1.001 I get obvious seams on iOS. It looks like Acorn Antics uses bilinear filtering for tiles - could that explain why you get no seams due to the soft edges? We're using point filtering to reduce blurriness. It seems fine with no seams at tile scale = 1.01 though.
     
  27. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    It could be the bilinear filtering. I don't use any tile scale for the Gem Hunt demo, which uses point filtering, and haven't seen any seams (haven't tried on iOS though).

    --Eric
     
  28. chronixX

    chronixX

    Joined:
    Jan 29, 2015
    Posts:
    3
    {SOLVED - Check sprite scaling when using 16x16 sprites in Unity}

    My level is not visible in the scene. Steps i took:

    - Imported Spritetile via assetstore
    - created a level
    - created a cam script:

    using UnityEngine;
    using System.Collections;
    using SpriteTile; // C#

    public class defaultCam : MonoBehaviour {

    public TextAsset myLevel;

    void Awake() {
    Tile.SetCamera ();
    Tile.LoadLevel (myLevel);
    }

    }

    - attached the level file to the cam
    - start game - nothing - no error messages
     
    Last edited: Feb 11, 2015
  29. chronixX

    chronixX

    Joined:
    Jan 29, 2015
    Posts:
    3
    Got it fixed. It was something with my sprites being too small i guess.

    Is there a way to preview the scene?
     
  30. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    Yes, you can use the preview button in the TileEditor.

    --Eric
     
  31. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    New version out!

    SpriteTile 2.7

    Additions:
    • Tile.GetSortingLayerName function, which returns the sorting layer name for a given layer number. Useful for putting sprites on a layer numerically, since Unity doesn't include any functions for this.
    • Tile.CameraRotationX, Tile.CameraRotationY, and Tile.CameraRotationZ, for applying a rotation to the camera on the X, Y or Z axes respectively.

    Changes:
    • Due to changes in Unity 5, sorting layer names are required rather than setting the ID. Since Unity has no way of querying the list of sorting layer names at runtime, this must be done manually by using the "Assets -> Set SpriteTile Sorting Layer Names" menu item in Unity. This only has to be done once after you add sorting layers in the "Tags and Layers" project setting, or if you rename any existing sorting layers.
    • The default materials for transparent unlit sprites and transparent pixel lit sprites are picked up from the SpriteTile/Resources folder automatically, namely the Default and Diffuse materials respectively. (This was already the case for non-transparent unlit and lit sprites.) So changing the Default and Diffuse materials (such as the pixel snap setting) will automatically cause all relevant sprites to use the changes.
    • Tile.GrabSprite, if using "true" with the deleteTile parameter, also deletes the collider for that cell (if there is one).
    • Documentation is now split into two files, SpriteTile Documentation (the standard docs) and SpriteTile Reference Guide (the docs for all the Tile functions).

    TileEditor Additions:
    • An "Import" button for importing Tiled (.tmx) maps. The importing only works with orthogonal maps using uncompressed XML format, and only imports tiles (no special objects etc.). Multiple layers are supported.
    • A "Move to" button for moving selected tiles to another layer, as long as both layers are the same size. This is easier than cutting and pasting between layers, and works with multiple-selection (double-click selected) tiles.
    • An "Order fill" button, which fills the selection with a range of order-in-layer values, as defined by the four corners. Useful for isometric effects and other cases where you want lots of tiles drawn in a certain order.

    TileEditor Changes:
    • "Save As" supplies the current file name (if any) by default.

    TileEditor Fixes:
    • Fixed problems with deleting a tileset if there were tiles drawn that used higher tilesets.
    • Fixed spurious error that could be printed when dragging the vertical divider in certain cases.
    • If a tile has a default order-in-layer value of 0, drawing with the tile doesn't overwrite existing order-in-layer values in the map.

    -------

    Let me know if you use the Tiled import function and it doesn't work for you. This feature didn't get as much testing as I would have liked, since it was hard to find sample Tiled maps. (But it does, of course, work fine for the ones I did test.)

    --Eric
     
  32. orb

    orb

    Joined:
    Nov 24, 2010
    Posts:
    3,037
    I just got SpriteTile, and I discovered some oddness with it which I'm not sure is by design, because of limitations or if it's a bug.

    I'm using it in 5.0 RC2, and some of the images I use in a little test are really large. I've set these images to be 128x128 max in the image import settings. I loaded the whole folder into the editor as a tile set, and it looked fine, but only the actual 128x128 images appear as normal. All of the very large images still use the original PNG size, rather than limiting themselves to the import size.

    Maybe I've got some concepts completely wrong, but if I import an image as a sprite/UI image and set the max size, shouldn't everything be that size? I'm working around it by resizing all the imported images for now, but it seems like something I shouldn't have to do. When using them as sprites, I have full control over the maximum size.
     
  33. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    SpriteTile can only use sprites (and whatever texture settings you used for them) and has no access to the original source files. Have you checked the pixels to units ratio in the import settings?

    --Eric
     
  34. orb

    orb

    Joined:
    Nov 24, 2010
    Posts:
    3,037
    It might be something to do with the ratio there then. I found it cleaner to just make the source art all the same size anyway :)
     
  35. archwaykitten

    archwaykitten

    Joined:
    Jun 12, 2014
    Posts:
    14
    Is it possible to set two (or more) SpriteTile layers to share the same Sorting Layer within Unity? I would like to use SpriteTile's layer functionality as an organizational tool, but I suspect I will need finer control over when to draw certain tiles than "draw this entire layer over the previous one, no exceptions".

    Thanks!
     
    Last edited: Feb 18, 2015
  36. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    Currently you'd have to modify the source code (specifically the SetTileObjects function, which sets the layers for the sprites).

    --Eric
     
  37. orb

    orb

    Joined:
    Nov 24, 2010
    Posts:
    3,037
    I'm seeing some odd results from Tile.GetMapPosition().

    I call it like this:
    Code (CSharp):
    1. Int2 loc = Tile.GetMapPosition(Input.mousePosition);
    The returned result varies depending on where I click over a tile, and the lower left is far higher than 0,0. It's basically not returning map coordinates. What am I doing wrong?
     
  38. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    GetMapPosition uses world space coords. ScreenToMapPosition converts screen space coords to map coords. (By the way, the next version will change GetMapPosition to WorldToMapPosition for better consistency and less badly-thought-out-function-name-ness.)

    --Eric
     
  39. orb

    orb

    Joined:
    Nov 24, 2010
    Posts:
    3,037
    Doh - I should have read further down the docs! Cheers :)
     
  40. MaddoScientisto

    MaddoScientisto

    Joined:
    Jan 30, 2015
    Posts:
    62
    I just upgraded SpriteTile and did the thing with asset -> set spritetile sorting layer names but when I try to run the game I get a "sorting layer name mismatch" error and it tells me to do what I just did.
    Do I have to do something else? I'm using unity 4.6.3f1, I just updated to it
     
  41. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    Do you have enough sorting layers in Unity for the number of layers in your SpriteTile level? Are they all named uniquely, and in numerical order?

    --Eric
     
  42. MaddoScientisto

    MaddoScientisto

    Joined:
    Jan 30, 2015
    Posts:
    62
    These are my layers, I have no idea if it matters that they aren't really ordered numerically, I'll try rearranging them

    EDIT: rearranging them worked it seems
     
  43. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    It does matter; see "how layers work" in the docs. I do wish Unity's sorting layer scripting interface was a lot better since it makes stuff like this unnecessarily difficult. (I have improved the error message for that case, though.)

    --Eric
     
    MaddoScientisto likes this.
  44. MetalStorm80

    MetalStorm80

    Joined:
    Feb 24, 2015
    Posts:
    11
    First off this package is amazing and I love it.

    The problem I am running in to is more than likely really simple and I just missed it but I have gone through the documentation multiple times and cant figure it out.

    When I am building my map with all of the tiles transparency does not seem to be working when I use multiple tiles on one layer with different sort order values set.

    Example. I am putting down my ground terrain tiles and then I go to put trees, mountains, a path, etc over them and the transparency does not show up so I get some mountains with a white background in that tile even though my tile has transparency outside of the mountains so the terrain should show up there.

    If I make a new layer it seems to work but I don't think I should have to do that and then I can only see one layer below it with the show preceding option enabled.

    Am I missing something really simple here?

    and just as a note the tileset I made works fine in things like Tiled. By the way the 'Non-transparent' option is NOT checked.
     
  45. SiliconAvatar

    SiliconAvatar

    Joined:
    Mar 23, 2014
    Posts:
    50
    Cool.

    The new version is out (I'm late to the party).

    I'm going to check SpriteTile out this weekend.

    The tmx loading function will get plenty of testing shortly. :>
     
  46. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    Thank you!

    Do you mean like in the Gem Hunt demo, where tree tiles with transparency are drawn over the grass tiles? It uses order-in-layer values to make the trees appear correctly sorted within the same layer. Do you have a screenshot of the problem?

    --Eric
     
  47. MetalStorm80

    MetalStorm80

    Joined:
    Feb 24, 2015
    Posts:
    11

    Sure here is a screenshot, So what I have done here is I have the first layer of all the water/ocean and then on Layer1 I added some land tiles with an Order number of 1 in the Tiles window. Then I put the house on that layer with an Order number of 4 to have it over top of the land tiles, the background of the house tile is transparent but when I place it the background is white.

    If I add another layer over this and place the house tile it looks great and you see the land below it but if you have to do it using that method then you can only see the 1 layer before and 1 layer after using the show preceding and show next check box so a lot of the time you can not see most of the tiles placed once you have several layers (I think that is more designed for your demo where the roof of the building opens and you can see inside).

    Am I doing something wrong? I assumed the Order field in the tiles window would be used just like sorting layers in unity where I could have the water first, then land so it renders over top of the water tiles, then a path tile, then mountains, trees, houses etc and you would see the lower ordered tiles underneath the transparent space in those tiles.

    http://i.imgur.com/NXrGRlP.png

    I may end up using Tiled and making it in there to import in to SpriteTile but if I could do it right in there that would be great.
     
  48. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    A tile can't be two things at once...it will either be a grass tile or a house tile. If you want a house tile on top of a grass tile, it should be on another layer. The order-in-layer sorting options are for sorting tiles within the same layer, in the case where they overlap (such as the Gem Hunt tree tile, which is bigger than the grass tiles and therefore overlaps them). You wouldn't use order-in-layer sorting for sorting between layers; the layers themselves are sorted. If you have no overlapping tiles then there is no reason to use order-in-layer sorting at all.

    I was thinking of having a show all previous/next layers option, but in this case wouldn't you just have two layers anyway? One for the water/grass and one for the house?

    --Eric
     
  49. MetalStorm80

    MetalStorm80

    Joined:
    Feb 24, 2015
    Posts:
    11
    Thanks for the info. I am still completely new to Programming, Unity and game design so its been a big learning curve.

    I just read in to sorting layers wrong.

    I bought a few books on Unity and C# for unity so I will look in to it more.

    So for the most part I would use 1 layer for all of the water and land tiles and then another layer for everything else that goes on top of the land?

    Btw thanks for the fast responses, for 30 bucks your assets are more than worth it. Looks like you put a lot of work in to this.
     
  50. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    Yes, that seems reasonable.

    That I did. :)

    --Eric