Features
• Automatic sorting 2D isometric tiles and objects;
• Sorting objects with single-tile size as well as multiple-tiles size;
• Auxiliary functions for converting isometric coordinates into screen coordinates and conversely;
• Placing and snapping of objects in the Unity editor;
• Helpful mouse and touch functions;
• Custom isometric tile angle, ratio and height;
• Support multiple isometric worlds in a scene with different settings;
• Mix 2D and 3D support;
• Physics support! (Colliders, Rigidbodies, Trigger and Collision events);
• Full PlayMaker support.
You always seem update the whole world if only one tile changes. Why not update just that tile? This looks like it will get slugish really fast with high tile counts. And this isn’t only in the editor. If I’m doing a simple animation of one tile while the game runs, you scan all tiles, build up this dependency list, which is an O(n^2) operation and place all tiles again. For me the problem looks like the depth calculation could be based on a formula that absolutely places every tile, so you only need to calculate the depth of the changing tile, not of all.
You may need to check the max size of each tile once at game start or when you add new tiles and store it in the world, so you know how much to offset the dept for each layer, but that should be all the dependency needed, then you can calculate the sortingOrder only for the changing tile absolutely.
Otherwise in a 10x50 world with animation, in every frame you rebuild your 500+ ObjectInfo list and trash the old objects again and your dependency scan does 250000+ steps etc. and then all the Vector3 that get recreated and trashed every frame.
Bug: In your example Scene2, if you remove the first top layer of tiles, you see that the floor tile on the second floor that is closest to the camera doesn’t get sorted above the front pillar Cube_1x1x3
Some documentation stating how to calculate the sprites origin would be nice, not everybody may realize this immediately and in your video you also seem to wing it a little at one point instead of calculating the exact value and then setting it.
You force a pixel per unit of 1 for the sprites - This isn’t felxible enough and should be changed, so the developer can use his own scale to allow to control the orthographicSize as needed.
This looks promising so far, but I can’t recommend it for games above a certain tile count - especially not on mobile. And the missing flexibility in “pixel per unit” means you have to start with this Asset and adapt everything else to its needs, which makes adding this in a later gamedev stage harder.
I’m delaying my asset store user review till I know if you plan any changes.
edit:
Regarding the calculation of the sprite origin, I forgot to add, that this is especially important for tiles of size 2x2, 4x2, etc., which you don’t demonstrate in your examples. The origin can’t be placed on the middle tile for those. And actually, your code for “max_ax” etc. seem to indicate that it shouldn’t be placed on the middle tile for 3x3 tiles either, which you did and this might cause the bug above, as your code seems to assume the tile size goes from pos.x to pos.x+size.x, not from pos.x ± size.x/2 …
Version 1.3
New ‘UpDown’ isometric type (like jrpg).
Optional sorting flag.
New TilePosition function.
Added Unity 5 support.
Fix some bug (#3) from bug tracker.
Hi,
Just bought the plugin. I want to achieve top down isometric map. but this plugin does not allow that. transform is restricted to only two axis. Can you confirm whether top down isometric grid is achievable ? And do you have any guidelines for creating custom isometric tiles. My tiles don align properly. Thanks
can you modify this code and support top down support as well
public Vector2 IsoToScreen(Vector3 pos) {
switch ( TileType ) {
case TileTypes.Isometric:
return new Vector2(
(pos.x - pos.y),
(pos.x + pos.y) * 0.5f + pos.z) * TileSize;
case TileTypes.UpDown:
return new Vector2(
pos.x,
pos.y + pos.z) * TileSize;
default:
throw new UnityException("IsoWorld. Type is wrong!");
}
}
Attached screenshot of my game itself. I have tile images and having difficult aligning and snapping so i purchased this package. I want it to top-down for other technical reasons. With some modifications to your system we can support top-down isometric as well i assume. May be it will help other developers also in future. Thanks